Skip to content

Instantly share code, notes, and snippets.

@alkrauss48
Created March 25, 2015 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alkrauss48/bfcb0fcb4d7eb734424c to your computer and use it in GitHub Desktop.
Save alkrauss48/bfcb0fcb4d7eb734424c to your computer and use it in GitHub Desktop.
Base Browserify Configuration with Grunt Watching
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify : {
app : {
files : {
'dist/app.js' : ['scripts/app.js']
}
},
},
watch: {
options: {
livereload: true
},
browserify: {
files: [ 'scripts/*.js', 'scripts/lib/*.js' ],
tasks: [ 'browserify' ]
},
},
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-browserify');
// Default task(s).
grunt.registerTask('default', [
'browserify',
'watch'
]);
};
{
"name": "app-name",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-watch": "~0.6.1",
"grunt-browserify": "~3.3.0",
"browserify": "~9.0.3"
},
"private": "true",
"license": "MIT"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment