parent
							
								
									52cf4e0b85
								
							
						
					
					
						commit
						0182e0adf3
					
				| @ -0,0 +1,22 @@ | |||||||
|  | Index: src/sunstone/public/Gruntfile.js
 | ||||||
|  | --- src/sunstone/public/Gruntfile.js
 | ||||||
|  | +++ src/sunstone/public/Gruntfile.js
 | ||||||
|  | @@ -14,6 +14,8 @@
 | ||||||
|  |  /* limitations under the License.                                             */
 | ||||||
|  |  /* -------------------------------------------------------------------------- */
 | ||||||
|  | 
 | ||||||
|  | +const sass = require('node-sass');
 | ||||||
|  | +
 | ||||||
|  |  module.exports = function(grunt) {
 | ||||||
|  |    grunt.initConfig({
 | ||||||
|  |      pkg: grunt.file.readJSON("package.json"),
 | ||||||
|  | @@ -24,7 +26,8 @@
 | ||||||
|  |        },
 | ||||||
|  |        dist: {
 | ||||||
|  |          options: {
 | ||||||
|  | -          outputStyle: "compressed"
 | ||||||
|  | +          outputStyle: "compressed",
 | ||||||
|  | +	         implementation: sass
 | ||||||
|  |          },
 | ||||||
|  |          files: {
 | ||||||
|  |            "css/app.css": "scss/app.scss"
 | ||||||
| @ -0,0 +1,13 @@ | |||||||
|  | Index: src/sunstone/public/package.json
 | ||||||
|  | --- src/sunstone/public/package.json
 | ||||||
|  | +++ src/sunstone/public/package.json
 | ||||||
|  | @@ -6,7 +6,7 @@
 | ||||||
|  |      "grunt-cli": "1.3.2",
 | ||||||
|  |      "grunt-contrib-requirejs": "1.0.0",
 | ||||||
|  |      "grunt-contrib-watch": "1.1.0",
 | ||||||
|  | -    "grunt-sass": "2.1.0",
 | ||||||
|  | -    "node-sass": "4.14.1"
 | ||||||
|  | +    "grunt-sass": "3.1.0",
 | ||||||
|  | +    "node-sass": "7.0.1"
 | ||||||
|  |    }
 | ||||||
|  |  }
 | ||||||
| @ -0,0 +1,117 @@ | |||||||
|  | /* -------------------------------------------------------------------------- */ | ||||||
|  | /* Copyright 2002-2022, OpenNebula Project, OpenNebula Systems                */ | ||||||
|  | /*                                                                            */ | ||||||
|  | /* Licensed under the Apache License, Version 2.0 (the "License"); you may    */ | ||||||
|  | /* not use this file except in compliance with the License. You may obtain    */ | ||||||
|  | /* a copy of the License at                                                   */ | ||||||
|  | /*                                                                            */ | ||||||
|  | /* http://www.apache.org/licenses/LICENSE-2.0                                 */ | ||||||
|  | /*                                                                            */ | ||||||
|  | /* Unless required by applicable law or agreed to in writing, software        */ | ||||||
|  | /* distributed under the License is distributed on an "AS IS" BASIS,          */ | ||||||
|  | /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   */ | ||||||
|  | /* See the License for the specific language governing permissions and        */ | ||||||
|  | /* limitations under the License.                                             */ | ||||||
|  | /* -------------------------------------------------------------------------- */ | ||||||
|  | 
 | ||||||
|  | const sass = require('node-sass'); | ||||||
|  | 
 | ||||||
|  | module.exports = function(grunt) { | ||||||
|  |   grunt.initConfig({ | ||||||
|  |     pkg: grunt.file.readJSON("package.json"), | ||||||
|  | 
 | ||||||
|  |     sass: { | ||||||
|  |       options: { | ||||||
|  |         includePaths: ["bower_components/foundation-sites/scss"] | ||||||
|  |       }, | ||||||
|  |       dist: { | ||||||
|  |         options: { | ||||||
|  |           outputStyle: "compressed", | ||||||
|  | 	        implementation: sass | ||||||
|  |         }, | ||||||
|  |         files: { | ||||||
|  |           "css/app.css": "scss/app.scss" | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     watch: { | ||||||
|  |       grunt: { | ||||||
|  |         files: ["Gruntfile.js"] | ||||||
|  |       }, | ||||||
|  | 
 | ||||||
|  |       sass: { | ||||||
|  |         files: "scss/*.scss", | ||||||
|  |         tasks: ["sass"] | ||||||
|  |       }, | ||||||
|  | 
 | ||||||
|  |       requirejs: { | ||||||
|  |         files: "app/**/*.js", | ||||||
|  |         tasks: ["requirejs"] | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     requirejs: { | ||||||
|  |       compileCSS: { | ||||||
|  |         options: { | ||||||
|  |           out: "./css/app.min.css", | ||||||
|  |           cssIn: "./css/app.css", | ||||||
|  |           optimizeCss: "default" | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       compileJS: { | ||||||
|  |         options: { | ||||||
|  |           appDir: "./app", | ||||||
|  |           baseUrl: "./", // 1
 | ||||||
|  |           dir: "./dist", // 2
 | ||||||
|  |           //name: 'vendor/almond', // 3
 | ||||||
|  |           mainConfigFile: "./app/main.js", // 5
 | ||||||
|  |           preserveLicenseComments: false, | ||||||
|  |           optimize: "none", | ||||||
|  |           generateSourceMaps: true, | ||||||
|  |           removeCombined: true, | ||||||
|  |           //skipDirOptimize: false,
 | ||||||
|  |           //findNestedDependencies: true,
 | ||||||
|  |           modules: [ | ||||||
|  |             { | ||||||
|  |               name: "main", | ||||||
|  |               include: ["almond"] | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               name: "login", | ||||||
|  |               include: ["almond"], | ||||||
|  |               insertRequire: ["login"] | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               name: "console/vnc", | ||||||
|  |               include: ["almond"], | ||||||
|  |               insertRequire: ["console/vnc"] | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               name: "console/vmrc", | ||||||
|  |               include: ["almond"], | ||||||
|  |               insertRequire: ["console/vmrc"] | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               name: "console/spice", | ||||||
|  |               include: ["almond"], | ||||||
|  |               insertRequire: ["console/spice"] | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               name: "console/guacamole", | ||||||
|  |               include: ["almond"], | ||||||
|  |               insertRequire: ["console/guacamole"] | ||||||
|  |             } | ||||||
|  |           ] | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }); | ||||||
|  | 
 | ||||||
|  |   grunt.loadNpmTasks("grunt-sass"); | ||||||
|  |   grunt.loadNpmTasks("grunt-contrib-watch"); | ||||||
|  |   grunt.loadNpmTasks("grunt-contrib-requirejs"); | ||||||
|  | 
 | ||||||
|  |   grunt.registerTask("build", ["sass"]); | ||||||
|  |   grunt.registerTask("default", ["build","watch"]); | ||||||
|  | }; | ||||||
| @ -0,0 +1,12 @@ | |||||||
|  | { | ||||||
|  |   "name": "opennebula-sunstone", | ||||||
|  |   "version": "0.0.1", | ||||||
|  |   "devDependencies": { | ||||||
|  |     "grunt": "<1.1.0", | ||||||
|  |     "grunt-cli": "1.3.2", | ||||||
|  |     "grunt-contrib-requirejs": "1.0.0", | ||||||
|  |     "grunt-contrib-watch": "1.1.0", | ||||||
|  |     "grunt-sass": "3.1.0", | ||||||
|  |     "node-sass": "7.0.1" | ||||||
|  |   } | ||||||
|  | } | ||||||
					Loading…
					
					
				
		Reference in new issue