moved css min to exec, import was not working via grunt

This commit is contained in:
Henry Oswald 2016-07-10 11:04:51 +01:00
parent e1fb4a51c6
commit 85936a1391
2 changed files with 6 additions and 7 deletions

View file

@ -17,7 +17,6 @@ module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-watch' grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-parallel' grunt.loadNpmTasks 'grunt-parallel'
grunt.loadNpmTasks 'grunt-exec' grunt.loadNpmTasks 'grunt-exec'
grunt.loadNpmTasks 'grunt-contrib-cssmin'
# grunt.loadNpmTasks 'grunt-contrib-imagemin' # grunt.loadNpmTasks 'grunt-contrib-imagemin'
# grunt.loadNpmTasks 'grunt-sprity' # grunt.loadNpmTasks 'grunt-sprity'
@ -26,6 +25,8 @@ module.exports = (grunt) ->
exec: exec:
run: run:
command:"node app.js | ./node_modules/logger-sharelatex/node_modules/bunyan/bin/bunyan --color" command:"node app.js | ./node_modules/logger-sharelatex/node_modules/bunyan/bin/bunyan --color"
cssmin:
command:"node_modules/clean-css/bin/cleancss -o public/stylesheets/style.css public/stylesheets/style.css"
watch: watch:
@ -134,10 +135,8 @@ module.exports = (grunt) ->
files: files:
"public/stylesheets/style.css": "public/stylesheets/style.less" "public/stylesheets/style.css": "public/stylesheets/style.less"
cssmin:
target:
files:
"public/stylesheets/style.css": "public/stylesheets/style.css"
env: env:
run: run:
@ -364,7 +363,7 @@ module.exports = (grunt) ->
grunt.registerTask 'compile:server', 'Compile the server side coffee script', ['clean:app', 'coffee:app', 'coffee:app_dir', 'compile:modules:server'] grunt.registerTask 'compile:server', 'Compile the server side coffee script', ['clean:app', 'coffee:app', 'coffee:app_dir', 'compile:modules:server']
grunt.registerTask 'compile:client', 'Compile the client side coffee script', ['coffee:client', 'coffee:sharejs', 'wrap_sharejs', "compile:modules:client", 'compile:modules:inject_clientside_includes'] grunt.registerTask 'compile:client', 'Compile the client side coffee script', ['coffee:client', 'coffee:sharejs', 'wrap_sharejs', "compile:modules:client", 'compile:modules:inject_clientside_includes']
grunt.registerTask 'compile:css', 'Compile the less files to css', ['less'] grunt.registerTask 'compile:css', 'Compile the less files to css', ['less']
grunt.registerTask 'compile:minify', 'Concat and minify the client side js', ['requirejs', "file_append", "cssmin"] grunt.registerTask 'compile:minify', 'Concat and minify the client side js', ['requirejs', "file_append", "exec:cssmin",]
grunt.registerTask 'compile:unit_tests', 'Compile the unit tests', ['clean:unit_tests', 'coffee:unit_tests'] grunt.registerTask 'compile:unit_tests', 'Compile the unit tests', ['clean:unit_tests', 'coffee:unit_tests']
grunt.registerTask 'compile:acceptance_tests', 'Compile the acceptance tests', ['clean:acceptance_tests', 'coffee:acceptance_tests'] grunt.registerTask 'compile:acceptance_tests', 'Compile the acceptance tests', ['clean:acceptance_tests', 'coffee:acceptance_tests']
grunt.registerTask 'compile:smoke_tests', 'Compile the smoke tests', ['coffee:smoke_tests'] grunt.registerTask 'compile:smoke_tests', 'Compile the smoke tests', ['coffee:smoke_tests']

View file

@ -69,11 +69,11 @@
"grunt-bunyan": "0.5.0", "grunt-bunyan": "0.5.0",
"grunt-contrib-clean": "0.5.0", "grunt-contrib-clean": "0.5.0",
"grunt-contrib-coffee": "0.10.0", "grunt-contrib-coffee": "0.10.0",
"grunt-contrib-cssmin": "^1.0.1",
"grunt-contrib-less": "0.9.0", "grunt-contrib-less": "0.9.0",
"grunt-contrib-requirejs": "0.4.1", "grunt-contrib-requirejs": "0.4.1",
"grunt-contrib-watch": "^1.0.0", "grunt-contrib-watch": "^1.0.0",
"grunt-env": "0.4.4", "grunt-env": "0.4.4",
"clean-css": "^3.4.18",
"grunt-exec": "^0.4.7", "grunt-exec": "^0.4.7",
"grunt-execute": "^0.2.2", "grunt-execute": "^0.2.2",
"grunt-file-append": "0.0.6", "grunt-file-append": "0.0.6",