Created
June 1, 2014 01:58
-
-
Save sunilw/e7d475be58699e2a0fff to your computer and use it in GitHub Desktop.
grunt confit with browserify and watchify
This file contains hidden or 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({ | |
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