-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
52 lines (50 loc) · 1.55 KB
/
Copy pathGruntfile.js
File metadata and controls
52 lines (50 loc) · 1.55 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
//grunt task configuration will go here
// data
ngAnnotate: {
options: {
singleQuotes: true
},
app: {
files: {
'./public/js-safe/all.js': ['./public/javascripts/**/*.js'],
'./public/js-safe/app.js': ['./public/javascripts/angularApp.js']
}
}
},
concat: {
js: { //target
src: ['./public/js-safe/app.js', './public/js-safe/all.js'],
dest: './public/js/app.js'
}
},
uglify: {
js: { //target
src: ['./public/js/app.js'],
dest: './public/js/app.js'
}
},
jshint: {
all: ['./public/javascripts/**/*.js', './routes/*.js', './models/*.js']
},
jasmine_node: {
options: {
forceExit: true
},
all: []
}
})
;
//load grunt tasks
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-ng-annotate');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jasmine-node');
//register grunt default task
grunt.registerTask('default', ['ngAnnotate', 'concat', 'uglify']);
grunt.registerTask('test', ['jshint']);
grunt.registerTask('jasmine', ['jasmine_node']);
};