Last active
April 25, 2023 09:05
-
-
Save shuhei/8418970 to your computer and use it in GitHub Desktop.
An example `gulpfile.js` for CoffeeScript and Browserify. Note that this uses gulp-browserify's master. Update this as soon as 0.2.6 is out.
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
/node_modules | |
/build | |
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
App = | |
start: -> | |
console.log "app started!" | |
module.exports = App |
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
var gulp = require('gulp'); | |
var browserify = require('gulp-browserify'); | |
var concat = require('gulp-concat'); | |
gulp.task('scripts', function () { | |
return gulp.src('./index.coffee', { read: false }) | |
.pipe(browserify({ transform: ['coffeeify'], extensions: ['.coffee'] })) | |
.pipe(concat('index.js')) | |
.pipe(gulp.dest('./build')); | |
}); | |
gulp.task('default', function () { | |
gulp.run('scripts'); | |
}); |
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
App = require('./app') | |
App.start() |
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
{ | |
"name": "gulp-coffee-browserify", | |
"version": "0.0.0", | |
"description": "Sample app for gulp, CoffeeScript and Browserify", | |
"author": "Shuhei Kagawa <shuhei.kagawa@gmail.com>", | |
"dependencies": { | |
"gulp": "~3.3.1", | |
"gulp-concat": "~2.1.7", | |
"gulp-browserify": "https://github.com/deepak1556/gulp-browserify/tarball/master", | |
"coffeeify": "~0.5.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right on!