-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgruntFile.js
More file actions
25 lines (23 loc) · 817 Bytes
/
Copy pathgruntFile.js
File metadata and controls
25 lines (23 loc) · 817 Bytes
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
module.exports = function(grunt) {
// load npm modules that we require in package.js
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-browserify');
// register our task/tasks we'd like to run below as our default (browserify and watch)
grunt.registerTask('default', ['browserify', 'watch']);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'), // points to package.json for reading
// Browserify settings that set up where our source JS file is with our browserified code
// and the file we'd like that to be built to
browserify: {
main: {
src: 'js/index.js',
dest: 'js/build.js'
}
},
// Set up watch task to rerun browserify task on any js changes
watch: {
files: 'js/*',
tasks: ['default']
}
});
}