Created
February 7, 2017 15:32
-
-
Save brendalong/c22b31d4942e97733d075e1380342307 to your computer and use it in GitHub Desktop.
grunt with 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){ | |
grunt.initConfig({ | |
browserify: { | |
'../dist/app.js': ['../javascripts/main.js'] | |
}, | |
jshint: { | |
options: { | |
predef: ["document", "console"], | |
esnext: true, | |
globalstrict: true, | |
globals: {"$": true}, | |
browserify: true | |
}, | |
files: ['../javascripts/**/*.js'] | |
}, | |
sass: { | |
dist:{ | |
files: { | |
'../css/main.css': '../sass/styles.scss' | |
} | |
} | |
}, | |
watch: { | |
javascripts: { | |
files: ['../javascripts/**/*.js'], | |
tasks: ['jshint', 'browserify'] | |
}, | |
sass: { | |
files: ['../sass/**/*.scss'], | |
tasks: ['sass'] | |
}, | |
browserify: { | |
files: ['../javascripts/*.js'], | |
tasks: ["browserify"] | |
} | |
} | |
}); | |
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
grunt.registerTask('default', ['jshint', 'sass', 'browserify', 'watch']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment