-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
61 lines (54 loc) · 2.02 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator:'',
banner: '/*! JStion — <%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
'build/JStion-<%= pkg.version %>.js' :[ '_src/core/*.js' ],
'build/JStion.Plans-<%= pkg.version %>.js' :[ '_src/plan/*.js' ],
'build/JStion.Exts-<%= pkg.version %>.js' :[ '_src/ext/*.js' ],
'build/JStion.UI-backbone-<%= pkg.version %>.js':[ '_src/backbone/*.js' ]
},
uglify: {
'build/JStion.min.js' : 'build/JStion-<%= pkg.version %>.js',
'build/JStion.Plans.min.js' : 'build/JStion.Plans-<%= pkg.version %>.js',
'build/JStion.Exts.min.js' :'build/JStion.Exts-<%= pkg.version %>.js',
'build/JStion.UI-backbone.min.js' : 'build/JStion.UI-backbone-<%= pkg.version %>.js'
},
jshint: {
files:[
'build/JStion-<%= pkg.version %>.js',
'build/JStion.Plans-<%= pkg.version %>.js',
'build/JStion.Exts-<%= pkg.version %>.js',
'build/JStion.UI-backbone-<%= pkg.version %>.js'
]
},
karma: {
options:{
frameworks: [ 'jasmine' ],
exclude: [ '*.js.ex' ],
singleRun: true,
browsers: [ 'PhantomJS' ],
reporters: [ 'progress' ],
autoWatch: false,
captureTimeout: 60000
},
JStion_behaviours:{
src: [],
files: [ '_dep/rollups/hmac-sha1.js', '_t/bind.js', 'build/JStion-<%= pkg.version %>.js', 'build/JStion.Plans-<%= pkg.version %>.js', 'build/JStion.Exts-<%= pkg.version %>.js', '_t/behaviours/*.js' ],
},
JStion_internals:{
src: [],
files: [ '_dep/rollups/hmac-sha1.js', '_t/bind.js', 'build/JStion-<%= pkg.version %>.js', 'build/JStion.Plans-<%= pkg.version %>.js', '_t/internals/*.js' ],
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-karma');
grunt.registerTask('test' ,[ 'concat', 'jshint', 'uglify', 'karma' ]);
grunt.registerTask('default' ,[ 'concat', 'uglify' ]);
};