-
Notifications
You must be signed in to change notification settings - Fork 34
/
Gruntfile.js
59 lines (55 loc) · 1.29 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
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt, {scope: ['dependencies', 'devDependencies']});
grunt.initConfig({
shell: {
test: {
options: { stdout: true },
command: 'jasmine-node spec/'
}
},
karma: {
plugins: [
'karma-osx-reporter'
],
unit: {
configFile: 'karma-unit.conf.js',
autoWatch: false,
singleRun: true
},
unitAuto: {
configFile: 'karma-unit.conf.js',
autoWatch: true,
singleRun: false
},
},
concat: {
dist: {
src: ['lib/json/*.js',
'lib/angular-resource/**/*.js',
'lib/simple-form/*.js'],
dest: '.tmp/ng-active-resource.js'
}
},
ngmin: {
dist: {
src: ['.tmp/ng-active-resource.js'],
dest: 'dist/ng-active-resource.js'
}
},
uglify: {
dist: {
src: 'dist/ng-active-resource.js',
dest: 'dist/ng-active-resource.min.js'
}
},
clean: [".tmp"]
});
grunt.registerTask('build', ['concat:dist', 'ngmin:dist', 'uglify:dist', 'clean']);
grunt.registerTask('test', 'karma:unit');
grunt.registerTask('autotest', [
'autotest:unit'
]);
grunt.registerTask('autotest:unit', [
'karma:unitAuto'
]);
}