-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
119 lines (105 loc) · 2.71 KB
/
Gruntfile.js
File metadata and controls
119 lines (105 loc) · 2.71 KB
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
111
112
113
114
115
116
117
118
119
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
scripts: {
files: [
'Gruntfile.js',
'src/*.js',
'examples/**/src/*.js'
],
tasks: ['default']
}
},
jshint: {
all: [
'Gruntfile.js',
'src/*.js'
],
options: {
"validthis": true,
"laxcomma" : true,
"laxbreak" : true,
"browser" : true,
"eqnull" : true,
"debug" : true,
"devel" : true,
"boss" : true,
"expr" : true,
"asi" : true,
'smarttabs': true,
'sub' : true
}
},
concat: {
perfect: {
src: ['src/perfect-runner.js', 'src/perfect-core.js'],
dest: 'dist/perfect.js'
},
qunit: {
src: ['src/perfect-qunit.js'],
dest: 'dist/perfect-qunit.js'
},
ui: {
src: ['src/perfect-ui.js'],
dest: 'dist/perfect-ui.js'
},
libs: {
src: [
'modules/lodash/lodash.js',
'modules/benchmark.js/benchmark.js',
'modules/lazyload/lazyload-min.js',
'modules/Mediator.js/mediator.min.js'
],
dest: 'dist/perfect-libs.js'
},
css: {
src: ['modules/bootstrap/docs/assets/css/bootstrap.css', 'src/perfect-ui.css'],
dest: 'dist/perfect-ui.css'
}
},
uglify: {
perfect: {
src: ['dist/perfect.js'],
dest: 'dist/perfect.min.js'
},
qunit: {
src: ['dist/perfect-qunit.js'],
dest: 'dist/perfect-qunit.min.js'
},
ui: {
src: ['dist/perfect-ui.js'],
dest: 'dist/perfect-ui.min.js'
},
libs: {
src: ['dist/perfect-libs.js'],
dest: 'dist/perfect-libs.min.js'
},
},
cssmin: {
minify: {
expand: true,
cwd: 'dist',
src: ['*.css', '!*.min.css'],
dest: 'dist',
ext: '.min.css'
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-update-submodules');
grunt.registerTask('submodules', ['update_submodules']);
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('default', [
'update_submodules',
'jshint',
'concat',
'uglify',
'cssmin:minify'
]);
};