forked from efri-yang/mobileValidate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
35 lines (35 loc) · 965 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
35
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
cssmin: {
minify:{
expand:true,
cwd:"demo/css",
src:["validate.css"],
dest:"dist/css",
ext:".css"
}
},
uglify:{
options: {
banner: '/*! \n版本:<%= pkg.version %>;\n作者:<%= pkg.author.name %>;\n邮箱:<%= pkg.author.email %>;\n博客地址:<%= pkg.author.blog %>;*/\n'
},
my_target: {
files:[
{'dist/js/jquery-mvalidate.js': ['demo/js/jquery-mvalidate.js']},
{'dist/js/zepto-mvalidate.js': ['demo/js/zepto-mvalidate.js']}
]
}
},
copy:{
my_target: {
files:[
{expand:true,src:["demo/css/validate.css"],dest:"src/css",flatten:true},
{expand:true,src:["demo/js/*.js"],dest:"src/js",flatten:true}
]
}
}
});
require('load-grunt-tasks')(grunt);
grunt.registerTask("default",['cssmin:minify',"uglify:my_target","copy:my_target"]);
}