-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
34 lines (33 loc) · 952 Bytes
/
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
/**
* Created by yiwei on 15/11/10.
*/
'use strict';
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
build: {
src: [
'build/**/*.js'
]
}
},
// js混淆压缩
uglify: {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */',
mangle: false //prevent changes to your variable and function names,
},
release_yw: {
files: [
{
'build/<%=pkg.name%>.min.<%=pkg.version%>.js': ['src/<%=pkg.name%>.js']
}
]
}
}
});
grunt.registerTask('build', ['clean:build', 'uglify']);
};