Created
July 27, 2015 14:52
-
-
Save BrianGenisio/bb1c5f36553e658a6d77 to your computer and use it in GitHub Desktop.
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) { | |
require('load-grunt-tasks')(grunt); | |
// Project configuration. | |
grunt.initConfig({ | |
browserify: { | |
app_dev: { | |
options: { | |
watch: true, | |
keepAlive: false, | |
transform: ['babelify'], | |
browserifyOptions: { | |
debug: true | |
} | |
}, | |
files: { | |
'dest/js/app.js': ['./source/**/*.js'] | |
} | |
}, | |
app_release: { | |
options: { | |
transform: ['babelify', 'uglifyify'], | |
}, | |
files: { | |
'dest/js/app.min.js': ['./source/**/*.js'] | |
} | |
} | |
}, | |
watch: { | |
app: { | |
files: 'dest/js/app.js', | |
options: { | |
livereload: true | |
} | |
} | |
}, | |
jshint: { | |
options: { | |
esnext: true | |
}, | |
app: ['./source/**/*.js'] | |
} | |
}); | |
// Default task(s). | |
grunt.registerTask('default', ['browserify:app_dev']); | |
grunt.registerTask('dev', ['browserify:app_dev', 'watch:app']); | |
grunt.registerTask('validate', ['jshint:app']); | |
grunt.registerTask('release', ['validate', 'browserify:app_release']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment