Created
November 22, 2013 08:37
-
-
Save anthonyringoet/7596751 to your computer and use it in GitHub Desktop.
Auto compile browserify with Grunt and watch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
browserify: { | |
dist: { | |
files: { | |
'build/module.js': ['js/**/*.js'] | |
} | |
} | |
}, | |
watch: { | |
scripts: { | |
files: ['js/**/*.js'], | |
tasks: ['browserify'], | |
options: { | |
spawn: false, | |
debounceDelay: 250 | |
}, | |
}, | |
}, | |
}); | |
grunt.loadNpmTasks('grunt-browserify'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.registerTask('default', ['browserify']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment