Created
March 25, 2015 16:35
-
-
Save alkrauss48/bfcb0fcb4d7eb734424c to your computer and use it in GitHub Desktop.
Base Browserify Configuration with Grunt Watching
This file contains 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) { | |
// 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' | |
]); | |
}; |
This file contains 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
{ | |
"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