Last active
August 29, 2015 14:18
-
-
Save winton/7811015fd6ee7b523232 to your computer and use it in GitHub Desktop.
Gulp task to compile and browserify a client coffeescript
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
| gulp = require "gulp" | |
| browserify = require "browserify" | |
| coffee = require "gulp-coffee" | |
| transform = require "vinyl-transform" | |
| gulp.task "coffee", -> | |
| gulp | |
| .src "./app/scripts/**/*.coffee" | |
| .pipe coffee bare: true | |
| .pipe gulp.dest("./dist/lib") | |
| gulp.task "scripts", [ "coffee" ], -> | |
| gulp | |
| .src("./dist/app/scripts/client.js") | |
| .pipe(browserified) | |
| .pipe gulp.dest("./dist/app") | |
| browserified = transform (filename) -> | |
| b = browserify(entries: filename, debug: true) | |
| b.bundle() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment