-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
93 lines (87 loc) · 3.28 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
module.exports = function(grunt) {
grunt.initConfig({
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},
target: {
files: {
'dist/css/ikaeasy.css': [
'master/css/ikaeasy.css',
//'master/css/ikalogs.css'
]
}
}
},
uglify: {
options: {
mangle: false,
compress: {
drop_console: true,
hoist_funs: false
},
//sourceMap: true
},
my_target: {
files: {
'dist/inner/ikaeasy.js': ['master/inner/ikaeasy.js'],
'dist/inner/background.min.js': ['master/inner/background.js'],
//'dist/jquery.min.js': ['master/jquery.min.js'],
'dist/app.min.js': [
'master/vendor/moment.js',
'master/jquery.min.js',
'master/vendor/jquery.countdown.min.js',
'master/langs/*.js',
"master/zJS/utils.js",
"master/zJS/lng.js",
"master/zJS/var.js",
"master/zJS/db.js",
"master/init.js",
"master/ikalogs.js",
'master/page/*.js',
"master/hotkeysPlugin.js",
"master/page/sendIKMessage.js",
"master/zJS/navigation.js",
]
}
}
},
copy: {
main: {
files: [
// includes files within path
//{expand: true, src: ['master/icon/*'], dest: 'dist/icon/', filter: 'isFile'},
// includes files within path and its sub-directories
//{expand: true, src: ['master/icon/**'], dest: 'dist/icon/'},
//// makes all src relative to cwd
{expand: true, cwd: 'master/icon/', src: ['**'], dest: 'dist/icon/'},
{expand: true, cwd: 'master/images/', src: ['**'], dest: 'dist/images/'},
//
//// flattens results to a single level
//{expand: true, flatten: true, src: ['path/**'], dest: 'dest/', filter: 'isFile'},
]
}
},
jshint: {
//ignore_warning: {
// options: {
// '-W015': true,
// },
// src: ['master/**/*.js']
//}
all: ['Gruntfile.js', 'master/**/*.js', '!master/jquery.min.js']
}
//watch: {
// files: ['<%= jshint.files %>'],
// tasks: ['jshint']
//}
});
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint');
//grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['cssmin', 'uglify', 'copy']);
};