Skip to content

Instantly share code, notes, and snippets.

@sunilw
Created June 1, 2014 01:58
Show Gist options
  • Save sunilw/e7d475be58699e2a0fff to your computer and use it in GitHub Desktop.
Save sunilw/e7d475be58699e2a0fff to your computer and use it in GitHub Desktop.
grunt confit with browserify and watchify
module.exports = function (grunt){
grunt.initConfig({
compass : {
dist : {
options : {
cssDir : 'css',
sassDir : 'sass',
debugInfo : true
}
}
}, // ends compass task definitions
php :{
dist : {
options : {
keepalive : true,
port: 9000
}
}
},
watch : {
files : ['*.html', '*.php', 'js/*', 'sass/*', 'css/*'],
tasks : ['compass'],
options : {
livereload: true
}
}, // ends watch task definition
watchify: {
dist: {
src: './js/src/main.js',
dest: 'js/bundle.js'
},
},
concurrent : {
target1 : [ 'watchify', 'php', 'watch'],
options : {
logConcurrentOutput : true
}
} // ends concurrent
}); // end task defintions
grunt.loadNpmTasks('grunt-php');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-watchify');
grunt.registerTask( 'default' , ['concurrent:target1', 'concurrent:target2'] ) ;
} ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment