-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.js
More file actions
109 lines (99 loc) · 2.67 KB
/
Gruntfile.js
File metadata and controls
109 lines (99 loc) · 2.67 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
coffee: {
build: {
expand: true,
cwd: 'resources/coffeescript',
src: ['**/*.coffee'],
dest: 'public/javascript',
ext: '.js'
}
},
jade: {
compile: {
options: {
pretty: true
},
files: [ {
cwd: "views/templates",
src: "**/*.jade",
dest: "spec/hbs",
expand: true,
ext: ".hbs"
} ]
}
},
handlebars: {
compile: {
options: {
namespace: "compTemplates",
},
files: [ {
expand: true,
cwd: 'spec/hbs',
src: '**/*.hbs',
dest: 'spec/helpers',
ext: '.js'
} ]
}
},
jasmine: {
src: [
'public/javascript/models/*.js',
'public/javascript/collections/*.js',
'public/javascript/router/*.js',
'public/javascript/views/helperViews/*.js',
'public/javascript/views/**/*.js'
],
options: {
outfile: 'spec/SpecRunner.html',
keepRunner: true,
vendor: [
'public/bower_components/jquery/jquery.min.js',
'public/bower_components/jqueryui/ui/minified/jquery-ui.min.js',
'public/bower_components/bootstrap/dist/js/bootstrap.min.js',
'public/bower_components/underscore/underscore-min.js',
'public/bower_components/backbone/backbone-min.js',
'public/bower_components/handlebars/handlebars.js',
'public/bower_components/d3/d3.min.js'
],
specs: 'spec/tests/*.js',
helpers: 'spec/helpers/**/*.js'
}
},
watch: {
compileCoffeeScript: {
files: [ 'resources/coffeescript/**/*.coffee' ],
tasks: [ 'compileCoffee', 'test' ],
options: {
livereload: true
}
},
compileJadeTemplates: {
files: [ 'views/templates/**/*.jade' ],
tasks: [ 'compileJade', 'hbs' ],
options: {
livereload: true
}
},
runTests: {
files: [ 'spec/tests/*.js'],
tasks: [ 'test' ],
options: {
livereload: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-handlebars');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-jade');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('hbs', ['handlebars']);
grunt.registerTask('compileJade', ['jade']);
grunt.registerTask('compileCoffee', ['coffee']);
grunt.registerTask('test', ['jasmine']);
grunt.registerTask('default', ['watch']);
};