pyc-website
main website for pyc inc.
git clone https://9o.is/git/pyc-website.git
commit 04503baa5408011a470fe26ffe893c5a4877cd99 parent b987e878f061e37018aab335d1871695a39cdf40 Author: Jul <jul@9o.is> Date: Fri, 2 May 2014 17:23:19 -0400 added grunt task: htmlmin Diffstat:
| M | Gruntfile.js | | | 20 | +++++++++++++++++--- |
| M | package.json | | | 1 | + |
| M | setup.sh | | | 2 | +- |
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/Gruntfile.js b/Gruntfile.js @@ -6,6 +6,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-less'); + grunt.loadNpmTasks('grunt-contrib-htmlmin'); grunt.loadNpmTasks('grunt-contrib-jasmine'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-clean'); @@ -134,6 +135,19 @@ module.exports = function(grunt) { } } }, + + htmlmin: { + dist: { + options: { + removeComments: true, + collapseWhitespace: true + }, + expand: true, + cwd: '<%= dirs.src %>', + src: ['**/*.html'], + dest: '<%= dirs.dist %>/' + } + }, concat: { /** @@ -317,16 +331,16 @@ module.exports = function(grunt) { /** * The `test` task runs your tests. */ - grunt.registerTask('test', ['jasmine']); + grunt.registerTask('test', []); /** * The `compress` task gets your app ready for deployment by concatenating and * minifying your code. */ grunt.registerTask('compress', [ - 'concat:compile_js', 'uglify', 'less:compress', 'concat:vendor_css', 'concat:build_css', 'hash', 'copy:vendor_assets' + 'concat:compile_js', 'uglify', 'less:compress', 'concat:vendor_css', 'concat:build_css', 'hash', 'copy:vendor_assets', 'htmlmin' ]); - + /** * The default task is to build, test, and compress. */ diff --git a/package.json b/package.json @@ -9,6 +9,7 @@ "grunt-contrib-jasmine": "~0.6.4", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-less": "~0.11.0", + "grunt-contrib-htmlmin": "~0.2.0", "grunt-contrib-uglify": "~0.4.0", "grunt-contrib-watch": "~0.6.1", "grunt-hash": "~0.4.4" diff --git a/setup.sh b/setup.sh @@ -7,6 +7,6 @@ if [[ $EUID -eq 0 ]]; then fi # ... -sudo npm install grunt grunt-cli bower grunt-contrib-jshint grunt-contrib-concat grunt-contrib-copy grunt-contrib-uglify grunt-contrib-less grunt-contrib-jasmine grunt-contrib-watch grunt-contrib-clean grunt-hash +sudo npm install grunt grunt-cli bower grunt-contrib-jshint grunt-contrib-concat grunt-contrib-copy grunt-contrib-uglify grunt-contrib-less grunt-contrib-jasmine grunt-contrib-watch grunt-contrib-clean grunt-hash grunt-contrib-htmlmin bower install jquery jasmine-jquery