-
Notifications
You must be signed in to change notification settings - Fork 38
/
Gruntfile.js
64 lines (53 loc) · 1.16 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
module.exports = function (grunt) {
grunt.initConfig({
jshint: {
all: ['Gruntfile.js', 'src/xStore.js', 'spec/spec.js'],
options: {
browser: true,
evil: false,
expr: true,
supernew: true,
eqeqeq: true,
eqnull: true,
forin: true,
smarttabs: true,
loopfunc: true
}
},
uglify: {
options: {
banner: grunt.file.read('src/xStore.js').split('\n')[0] + "\n"
},
my_target: {
files: {
'src/xStore.min.js': ['src/xStore.js']
}
}
},
jasmine: {
src: 'src/xStore.js',
options: {
specs: 'spec/spec.js',
vendor: 'vendor/jasmine/lib/jasmine-core/jasmine.js'
}
},
watch: {
test: {
files: ['src/xStore.js', 'spec/*'],
tasks: 'test'
},
min: {
files: ['src/xStore.js'],
tasks: 'min'
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('min', 'uglify');
grunt.registerTask('test', ['jshint', 'jasmine']);
grunt.registerTask('release', ['test', 'min']);
grunt.registerTask('default', 'release');
};