1.
2.
module.exports = function(grunt) {
3.
4.
grunt.initConfig({
5.
pkg: grunt.file.readJSON('package.json'),
6.
7.
qunit: {
8.
all: {
9.
options: {
10.
urls: ['test/index.html', 'test/loaders.html'],
11.
12.
},
13.
14.
}
15.
},
16.
17.
jshint: {
18.
options: {
19.
sub: true,
20.
strict: true,
21.
newcap: false,
22.
globals: {
23.
jQuery: true
24.
}
25.
},
26.
27.
with_overrides: {
28.
options: {
29.
strict: false
30.
},
31.
files: {
32.
src: ['i18n/*.js', 'test/tests.js']
33.
}
34.
},
35.
36.
all: ['spectrum.js']
37.
},
38.
39.
40.
uglify: {
41.
options: {
42.
},
43.
dist: {
44.
files: {
45.
'build/spectrum-min.js': ['spectrum.js']
46.
}
47.
}
48.
}
49.
50.
});
51.
52.
53.
grunt.loadNpmTasks('grunt-contrib-jshint');
54.
grunt.loadNpmTasks('grunt-contrib-qunit');
55.
grunt.loadNpmTasks('grunt-contrib-uglify');
56.
57.
58.
// Testing tasks
59.
grunt.registerTask('test', ['jshint', 'qunit']);
60.
61.
// Travis CI task.
62.
grunt.registerTask('travis', 'test');
63.
64.
// Default task.
65.
grunt.registerTask('default', ['test']);
66.
67.
//Build Task.
68.
grunt.registerTask('build', ['test', 'uglify']);
69.
70.
};
71.