js: produce minimized JS file as well as bundle
This commit is contained in:
parent
f86c6aaa61
commit
898c62f70d
4 changed files with 517 additions and 334 deletions
|
|
@ -13,9 +13,10 @@ module.exports = function(grunt) {
|
|||
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-webpack');
|
||||
grunt.registerTask('default', ['less:production', 'less:components', 'copy', 'webpack', 'concat:dist']);
|
||||
grunt.registerTask('default', ['less:production', 'less:components', 'copy', 'webpack', 'concat:dist', 'uglify:dist']);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -99,6 +99,12 @@
|
|||
"nonull": true
|
||||
}
|
||||
},
|
||||
"uglify": {
|
||||
"dist": {
|
||||
"src": "<%= dirs.js.dest %>/scripts.js",
|
||||
"dest": "<%= dirs.js.dest %>/scripts.min.js"
|
||||
}
|
||||
},
|
||||
"less": {
|
||||
"development": {
|
||||
"options": {
|
||||
|
|
|
|||
|
|
@ -22,13 +22,14 @@
|
|||
"grunt-contrib-less": "^1.1.0",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"grunt-webpack": "^3.1.3",
|
||||
"grunt-contrib-uglify": "^4.0.1",
|
||||
"jquery": "1.11.3",
|
||||
"mark.js": "8.11.1",
|
||||
"jshint": "^2.9.1-rc3",
|
||||
"moment": "^2.18.1",
|
||||
"mousetrap": "^1.6.1",
|
||||
"qrious": "^4.0.2",
|
||||
"sticky-sidebar": "3.3.4",
|
||||
"sticky-sidebar": "3.3.1",
|
||||
"waypoints": "4.0.1",
|
||||
"webpack": "4.23.1",
|
||||
"webpack-cli": "3.1.2",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue