Skip to content

Instantly share code, notes, and snippets.

@BrianGenisio
Created July 27, 2015 14:52
Show Gist options
  • Save BrianGenisio/bb1c5f36553e658a6d77 to your computer and use it in GitHub Desktop.
Save BrianGenisio/bb1c5f36553e658a6d77 to your computer and use it in GitHub Desktop.
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