-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
108 lines (94 loc) · 2.21 KB
/
Copy pathGruntfile.js
File metadata and controls
108 lines (94 loc) · 2.21 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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-injector');
grunt.loadNpmTasks("grunt-jscs");
grunt.loadNpmTasks('grunt-newer');
grunt.loadNpmTasks('grunt-ng-annotate');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-wiredep');
grunt.initConfig({
wiredep: {
bower: {
src: 'client/index.html' // .html support..
}
},
bower: {
install: {
options: {
targetDir: './bower_components',
copy: true
}
}
},
injector: {
local_dependencies: {
files: {
'client/index.html': ['client/**/*.js', 'client/**/*.css'],
}
},
options: {
starttag: '<!-- app:js -->',
endtag: '<!-- end_app -->'
}
},
watch: {
bower: {
files: ['bower_components**/*.js', 'bower_components**/*.js'],
tasks: ['wiredep'],
options: {
spawn: false,
},
},
app_scripts: {
files: ['client/**/*.js', 'client/**/*.css'],
tasks: ['injector', 'newer:ngAnnotate', 'newer:jscs'],
options: {
spawn: false,
},
},
},
nodemon: {
dev: {
script: 'app.js'
}
},
concurrent: {
serve: {
tasks: ['nodemon', 'watch'],
options: {
logConcurrentOutput: true
}
}
},
jscs: {
src: "client/**/*.js",
options: {
verbose: true, // If you need output with rule names http://jscs.info/overview.html#verbose
fix: true, // Autofix code style violations when possible.
requireCurlyBraces: ["if"]
}
},
ngAnnotate: {
options: {
singleQuotes: true,
},
app: {
expand: true,
src: 'client/app/components/**/*.js'
}
},
shell: {
multiple: {
command: [
'npm install',
'bower install'
].join('&&')
}
}
});
grunt.registerTask('default', ['concurrent:serve']);
grunt.registerTask('init', ['shell']);
};