From 542bce0ab64f4642a4dde21ee76128d605e30d54 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sat, 15 Oct 2016 21:40:20 +0200 Subject: [PATCH] Add less plugin. --- Gruntfile.js | 6 ++++++ grunt-config/less.js | 12 ++++++++++++ package.json | 1 + 3 files changed, 19 insertions(+) create mode 100644 grunt-config/less.js 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",