Browse Source

add grunt-contrib-less for automatic CSS generation via Grunt

Manfred Kroehnert 9 years ago
parent
commit
f8206d3752
2 changed files with 12 additions and 3 deletions
  1. 10 2
      Gruntfile.js
  2. 2 1
      package.json

+ 10 - 2
Gruntfile.js

@@ -17,11 +17,12 @@ module.exports = function(grunt) {
 
   // These plugins provide necessary tasks.
   grunt.loadNpmTasks('grunt-contrib-clean');
+  grunt.loadNpmTasks('grunt-contrib-less');
   grunt.loadNpmTasks('grunt-execute');
   grunt.loadNpmTasks('amber-dev');
 
   // Default task.
-  grunt.registerTask('default', ['amberc:all']);
+  grunt.registerTask('default', ['less', 'amberc:all']);
   grunt.registerTask('test', ['amberc:test_runner', 'execute:test_runner', 'clean:test_runner']);
   grunt.registerTask('devel', ['amdconfig:helios']);
 
@@ -35,11 +36,18 @@ module.exports = function(grunt) {
       '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
       ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
     // task configuration
+    less: {
+      development: {
+        files: {
+          'resources/helios.css': 'resources/helios.less'
+        }
+      }
+    },
+
     amberc: {
       options: {
         amber_dir: findAmberPath(['../..', 'bower_components/amber']),
         library_dirs: ['src'],
-        closure_jar: ''
       },
       all: {
         output_dir : 'src',

+ 2 - 1
package.json

@@ -25,8 +25,9 @@
   },
   "devDependencies": {
     "amber-dev": "^0.4.0",
-    "grunt": "^0.4.0",
+    "grunt": "^0.4.5",
     "grunt-contrib-clean": "^0.6.0",
+    "grunt-contrib-less": "^1.0.1",
     "grunt-execute": "^0.2.1",
     "requirejs": "^2.1.15"
   },