/
gruntfile.js
83 lines (75 loc) · 2.76 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
82
83
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
/* js hint js file check */
jshint: {
files: ['gruntfile.js', 'app/sum*.js'],
options: {
globals: {
jQuery: true,
console: true,
module: true,
},
loopfunc: true,
multistr: true
}
},
/* jasmine unit tests */
jasmine : {
src: [
'test/require-mock.js',
'app/injector.js',
'app/string-escape.js',
'app/config.js',
'app/sum-backend-client.js',
'app/sum-backend-helpers.js',
'app/sum-backend-server.js',
'app/sum-backend-userlist.js',
'app/sum-backend.js',
'app/sum-emoticons.js',
'app/sum-frontend-events.js',
'app/sum-frontend-helpers.js',
'app/sum-frontend.js'
],
options: {
specs: 'test/*.js',
vendor: [
'app/libs/class.js',
'app/libs/jquery-2.1.0.min.js',
'app/libs/jquery-custom-content-scroller/jquery.mousewheel.min.js',
'app/libs/jquery-custom-content-scroller/jquery.mCustomScrollbar.min.js',
'app/libs/alertify/alertify.min.js',
'app/libs/jcrop/jquery.Jcrop.min.js',
'app/libs/selectize/selectize.js',
'app/libs/crypto-js/md5.js',
'app/libs/highlight/highlight.pack.js',
'app/libs/jquery.waitforimages/jquery.waitforimages.js',
'app/libs/hyphenator/hyphenator.js'
]
}
},
/* build node webkit sum package */
nodewebkit: {
options: {
build_dir: './bin',
mac: false,
win: true,
linux32: false,
linux64: false
},
src: ['./app/**', './package.json', './node_modules/lockfile/**', './node_modules/node-rsa/**']
},
/* create setup file with inno setup */
shell: {
build_setup: {
command: 'call compil32 /cc setup.iss'
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-node-webkit-builder');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.registerTask('default', ['jasmine', 'jshint', 'nodewebkit', 'shell']);
grunt.registerTask('check', ['jasmine', 'jshint']);
};