From 3e6cf30cfd3baa887cbec80e6b0ce07d00383f23 Mon Sep 17 00:00:00 2001 From: John O'Nolan Date: Sun, 17 May 2015 13:33:41 +0100 Subject: [PATCH] Automate CSScomb --- Gruntfile.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 68be3b33b2..3cc84df12c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -83,6 +83,13 @@ var _ = require('lodash'), // **Note:** Without this option specified express won't be reloaded nospawn: true } + }, + csscomb: { + files: ['core/client/app/styles/**/*.css'], + tasks: ['shell:csscombfix'], + options: { + livereload: true + } } }, @@ -337,8 +344,12 @@ var _ = require('lodash'), command: 'npm shrinkwrap' }, - csscomb: { + csscombfix: { command: path.resolve(cwd + '/node_modules/.bin/csscomb -c core/client/app/styles/csscomb.json -v core/client/app/styles') + }, + + csscomblint: { + command: path.resolve(cwd + '/node_modules/.bin/csscomb -c core/client/app/styles/csscomb.json -lv core/client/app/styles') } }, @@ -615,7 +626,7 @@ var _ = require('lodash'), // // `grunt lint` will run the linter and the code style checker so you can make sure your code is pretty grunt.registerTask('lint', 'Run the code style checks and linter', - ['jshint', 'jscs'] + ['jshint', 'jscs', 'shell:csscomblint'] ); // ### test-setup *(utility)(