-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
31 lines (30 loc) · 964 Bytes
/
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
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt); //will load all the grunt plugins installed in the package.json
grunt.initConfig({
watch: {
//will watch for any modification of files
staticJS: {
files: ['./scripts/**.*'], //All files within directory
tasks: ['browserify:dist'], //will hint the files and then minify and concatinate
options: { //Server options
spawn: false, //Must have for reload
livereload: false //Enable LiveReload
}
}
},
browserify: {
dist: {
files: {
'./scripts/dist/truss.js': ['./scripts/main.js']
}
}
},
jshint: {
options: {
reporter: require('jshint-stylish') // use jshint-stylish to make our errors look and read good
},
client: ['./scripts/**.js']
}
});
grunt.registerTask('default', ['jshint:client','browserify:dist','watch:staticJS']);
};