diff --git a/Gruntfile.js b/Gruntfile.js index 7ba5af8..251008a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -101,6 +101,12 @@ module.exports = function(grunt) { 'wiredep:app' ]); + // Generate needed files. + grunt.registerTask('feGen', [ + // Generate CSS from Less. + 'newer:less:frontend' + ]); + // Linting grunt.registerTask('feLint', [ // ECMAScript diff --git a/grunt-config/less.js b/grunt-config/less.js new file mode 100644 index 0000000..60dac0b --- /dev/null +++ b/grunt-config/less.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = { + frontendDev: { + options: { + paths: ['<%= accountant.frontend.src %>/css'] + }, + files: { + '<%= accountant.frontend.src %>/css/main.css': '<%= accountant.frontend.src %>/css/main.less' + } + } +}; diff --git a/package.json b/package.json index 5c7906b..456a8bb 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "grunt-contrib-connect": "~1.0", "grunt-contrib-csslint": "^2.0.0", "grunt-contrib-cssmin": "~1.0", + "grunt-contrib-less": "^1.4.0", "grunt-contrib-uglify": "~2.0", "grunt-contrib-watch": "~1.0", "grunt-copy": "^0.1.0",