-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gruntfile.js
60 lines (55 loc) · 1.55 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
module.exports = function(grunt) {
// Loading tasks
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
// Config begins
grunt.initConfig({
uglify:{
dist:{
src:['backbone.baguette.js'],
dest:'backbone.baguette.min.js'
}
},
jshint:{
dev:['backbone.baguette.js'],
modules:['src/*.js']
},
concat:{
modules:{
src:['src/Utils.js','src/Loader.js','src/Templating.js','src/LoadableView.js','src/ModelView.js','src/CollectionView.js','src/CompositeView.js'],
dest:'backbone.baguette.js'
}
},
// jasmine:{
// all:['tests/SpecRunner.html']
// }
jasmine: {
dev: {
src: 'backbone.baguette.js',
options: {
helpers:['tests/lodash.js','tests/jquery.js','tests/handlebars.js','tests/backbone.js'],
specs: 'tests/spec/*Spec.js'
}
},
compiled:{
src: 'backbone.baguette.min.js',
options: {
helpers:['tests/lodash.js','tests/jquery.js','tests/handlebars.js','tests/backbone.js'],
specs: 'tests/spec/*Spec.js'
}
}
},
watch: {
dev: {
files: 'src/*.js',
tasks: ['compile']
}
}
});
grunt.registerTask('compile',['jshint:modules','concat:modules']);
grunt.registerTask('build',['compile','uglify','jasmine']);
grunt.registerTask('default',['compile']);
};