Skip to content

Instantly share code, notes, and snippets.

@JoeShep
Created August 23, 2016 14:19
Show Gist options
  • Select an option

  • Save JoeShep/a6e9a5ce51e9c86046578b0f0759275d to your computer and use it in GitHub Desktop.

Select an option

Save JoeShep/a6e9a5ce51e9c86046578b0f0759275d to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
// Change the b-fy task to add a transform task
browserify: {
js: {
src: ['./js/main.js'],
dest: 'dist/app.js'
},
options: {
transform: ['hbsfy']
}
},
jshint: {
options: {
predef: [ "document", "console", "$" ],
esnext: true,
globalstrict: true,
globals: {},
browserify: true
},
files: ['./js/**/*.js']
},
sass: {
dist: {
files: {
'./css/main.css': './sass/main.scss'
}
}
},
watch: {
javascripts: {
files: ['./js/**/*.js'],
tasks: ['jshint', 'browserify']
},
sass: {
files: ['./sass/**/*.scss'],
tasks: ['sass']
},
hbs: {
files: ['./templates/**/*.hbs'],
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