-
Notifications
You must be signed in to change notification settings - Fork 195
/
Copy pathGruntfile.js
43 lines (41 loc) · 1.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
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: ['js/**/*.js', '!js/**/*.min.js']
},
uglify: {
options: {
compress: true,
mangle: true,
preserveComments: 'some',
report: 'gzip'
},
build: {
files: [
{
expand: true, // Enable dynamic expansion.
src: ['js/**/*.js', '!js/**/*.min.js'],
ext: '.min.js', // Dest filepaths will have this extension.
extDot: 'last' // Extensions in filenames begin after the last dot
}
]
}
},
qunit: {
all: {
options: {
urls: ['test/index.html']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('test', ['jshint', 'qunit']);
grunt.registerTask('build', ['uglify']);
grunt.registerTask('default', ['test', 'build']);
};