-
Notifications
You must be signed in to change notification settings - Fork 84
/
Gruntfile.js
110 lines (106 loc) · 2.92 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'js/<%= pkg.name %>.concat.js',
dest: 'js/<%= pkg.name %>.min.js'
}
},
cssmin: {
build: {
src: 'css/<%= pkg.name %>.concat.css',
dest: 'css/<%= pkg.name %>.min.css'
}
},
concat: {
css: {
src: [
'css/main.css',
'css/color.css'
],
dest: 'css/<%= pkg.name %>.concat.css'
},
js: {
options: {
process: function(src, filepath) {
return '// Source: ' + filepath + '\n' + src;
}
},
src: [
'js/pttchrome.js',
'js/touch_controller.js',
'js/google_drive.js',
'js/app_conn.js',
'js/predefined_config.js',
'js/pref.js',
'js/emoticon.js',
'js/symbols.js',
'js/input_helper.js',
'js/ssh.js',
'js/telnet.js',
'js/b2u_table.js',
'js/u2b_table.js',
'js/term_buf.js',
'js/term_view.js',
'js/ansi_parser.js',
'js/symbol_table.js',
'js/string_util.js',
'js/i18n.js',
'js/en_US_messages.js',
'js/zh_TW_messages.js',
'js/main.js',
],
dest: 'js/<%= pkg.name %>.concat.js',
},
},
jshint: {
files: [
'js/pttchrome.js',
'js/touch_controller.js',
'js/google_drive.js',
'js/app_conn.js',
'js/predefined_config.js',
'js/pref.js',
'js/emoticon.js',
'js/symbols.js',
'js/input_helper.js',
'js/ssh.js',
'js/telnet.js',
'js/b2u_table.js',
'js/u2b_table.js',
'js/term_buf.js',
'js/term_view.js',
'js/ansi_parser.js',
'js/symbol_table.js',
'js/string_util.js',
'js/i18n.js',
'js/en_US_messages.js',
'js/zh_TW_messages.js',
'js/main.js',
],
options: {
// options here to override JSHint defaults
shadow: true,
esnext: true,
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-cssmin');
// Default task(s).
grunt.registerTask('default', ['jshint', 'concat:css', 'cssmin', 'concat:js', 'uglify']);
};