Created
October 1, 2013 22:30
-
-
Save spencercarnage/6786259 to your computer and use it in GitHub Desktop.
Sample grunt config using browserify
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: { | |
pages: { | |
files: [ | |
{ | |
expand: true, | |
cwd: 'javascript/src/pages/', | |
src: ['**/app.js'], | |
dest: 'javascript/build/pages/', | |
ext: '.js' | |
} | |
], | |
options: { | |
alias: [ | |
'javascript/libs/jquery.validate.min.js:validate' | |
], | |
shim: { | |
jQuery: { | |
path: 'javascript/libs/jquery-1.7.1.min.js', | |
exports: 'jQuery' | |
} | |
} | |
} | |
} | |
}, | |
watch: { | |
grunt: { | |
files: ['Gruntfile.js'] | |
}, | |
pages: { | |
files: ['javascript/src/pages/**/app.js'], | |
tasks: ['browserify:pages'], | |
options: { | |
livereload: true | |
} | |
} | |
} | |
}); | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment