Commit 91f6c784 by Vishal Kadam

Added compression task

parent de69ff95
'use strict'; 'use strict';
module.exports = function(grunt) { module.exports = function(grunt) {
// Project Configuration
var classPathSep = (process.platform === "win32") ? ';' : ':'; var classPathSep = (process.platform === "win32") ? ';' : ':';
grunt.initConfig({ grunt.initConfig({
pkg: grunt.file.readJSON('package.json'), pkg: grunt.file.readJSON('package.json'),
...@@ -78,7 +77,6 @@ module.exports = function(grunt) { ...@@ -78,7 +77,6 @@ module.exports = function(grunt) {
} }
} }
}, },
// app
dist: 'public/dist/app.min.js', dist: 'public/dist/app.min.js',
modules: grunt.file.expand( modules: grunt.file.expand(
'public/js/app.js', 'public/js/app.js',
...@@ -108,16 +106,22 @@ module.exports = function(grunt) { ...@@ -108,16 +106,22 @@ module.exports = function(grunt) {
updateType: 'force' updateType: 'force'
} }
} }
},
compress: {
main: {
options: {
archive: '<%= pkg.name %>_<%= pkg.version %>.tgz'
},
src: ['node_modules/**', 'package.json', 'server.js', 'server/**', 'public/**', '!public/js/**', '!public/modules/**/*.js']
}
} }
}); });
//Load NPM tasks
require('load-grunt-tasks')(grunt); require('load-grunt-tasks')(grunt);
//Default task(s).
grunt.registerTask('default', ['devUpdate', 'bower', 'jshint', 'jsbeautifier:default', 'shell:min']); grunt.registerTask('default', ['devUpdate', 'bower', 'jshint', 'jsbeautifier:default', 'shell:min']);
// Server task
grunt.registerTask('server', ['bower', 'jshint', 'concurrent']); grunt.registerTask('server', ['bower', 'jshint', 'concurrent']);
grunt.registerTask('server:prod', ['nodemon:prod']); grunt.registerTask('server:prod', ['nodemon:prod']);
grunt.registerTask('server:prod', ['nodemon:prod']);
}; };
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
"grunt-bower-task": "~0.4.0", "grunt-bower-task": "~0.4.0",
"grunt-cli": "~0.1.11", "grunt-cli": "~0.1.11",
"grunt-concurrent": "^1.0.0", "grunt-concurrent": "^1.0.0",
"grunt-contrib-compress": "^0.13.0",
"grunt-contrib-jshint": "^0.11.0", "grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-watch": "^0.6.0", "grunt-contrib-watch": "^0.6.0",
"grunt-dev-update": "^1.0.2", "grunt-dev-update": "^1.0.2",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment