forked from kalamuna/kalaboxv1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
81 lines (78 loc) · 1.86 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
'use strict';
module.exports = function (grunt) {
// Show elapsed time at the end
require('time-grunt')(grunt);
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
// jasmine node unit test
jasmine_node: {
options: {
forceExit: true,
match: '.',
matchall: false,
extensions: 'js',
specNameMatcher: 'spec',
jUnit: {
report: true,
savePath : "./report/jasmine/",
useDotNotation: true,
consolidate: true
}
},
app: ['spec/']
},
// Jshint
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
gruntfile: {
src: 'Gruntfile.js'
},
app: {
src: ['kalabox/**/*.js', 'scripts/**/*.js',
'./*.js', '!Gruntfile.js']
},
specs: {
src: ['test/**/*.js']
}
},
// watch
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
app: {
files: '<%= jshint.app.src %>',
tasks: ['jshint:lib', 'jasmine_node:app']
},
specs: {
files: ['<%= jshint.specs.src %>'],
tasks: ['jshint:specs', 'jasmine_node:app']
}
},
nodewebkit: {
app: {
options: {
build_dir: './build',
mac: true,
win: false,
app_name: 'Kalabox',
mac_icns: './app.icns',
zip: true
},
src: ['./**/*', '!./build']
}
},
clean: {
build: ['./build/releases']
}
});
// Default task.
grunt.registerTask('default', ['jshint','jasmine_node:app', 'clean:build', 'nodewebkit:app']);
grunt.registerTask('build', 'Builds a packaged version of the app', ['clean:build','nodewebkit:app']);
};