Last active
August 29, 2015 14:02
-
-
Save Remigr/98917ae6c0b862a4b90a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Run in the project folder : | |
$ npm install grunt-contrib-less --save-dev | |
2) Add less to config/env/all.js : | |
less: [ | |
'public/modules/*/less/*.less' | |
], | |
and modify the css config to this : | |
css: [ | |
'public/modules/*/less/*.css' | |
], | |
3) In gruntfile.js | |
*Change clientCSS to ClientLESS (line 10) : | |
clientLESS: ['public/modules/**/less/*.less'], | |
*Change clientCSS to clientLESS (line 44) : | |
clientLESS: { | |
files: watchFiles.clientLESS, | |
tasks: ['less', 'csslint'], | |
options: { | |
livereload: true | |
} | |
} | |
*Add less task : | |
less: { | |
development: { | |
files: { | |
'public/dist/modules.css': '<%= applicationLESSFiles %>' | |
} | |
} | |
}, | |
*Add LESS config (line 160) : | |
grunt.config.set('applicationLESSFiles', config.assets.less); | |
*Add the task to the lint tasks : | |
grunt.registerTask('lint', ['jshint', 'less', 'csslint']); | |
4) Rename all the directories public/modules/**/css to public/modules/**/less, and rename all the .css extension to .less. | |
Kudo's to Rémi. | |
6/2014 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think line 160 should be
otherwise you have no config