-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathGruntfile.js
39 lines (37 loc) · 1.08 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var webpack = require('webpack')
var webpack_config = require('./webpack.config.js');
module.exports = function(grunt) {
grunt.initConfig({
webpack: {
production: webpack_config,
},
compress: {
main: {
options: {
mode: 'zip',
archive: function(){
return 'publish-' + grunt.template.today('yyyymmddHHMMss') + '.zip';
}
},
expand: true,
cwd: 'public/',
src: ['**/*'],
}
},
clean: {
folder: ['public']
}
});
//grunt.loadNpmTasks('grunt-contrib-compass');
//grunt.loadNpmTasks('grunt-contrib-jshint');
//grunt.loadNpmTasks('grunt-contrib-uglify');
//grunt.loadNpmTasks('grunt-contrib-cssmin');
//grunt.loadNpmTasks('grunt-contrib-copy');
//grunt.loadNpmTasks('grunt-string-replace');
//grunt.loadNpmTasks('grunt-contrib-htmlmin');
//grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-webpack');
grunt.registerTask("default", ['clean','webpack','compress']);
}