Skip to content

Instantly share code, notes, and snippets.

@shuhei
Last active April 25, 2023 09:05
Show Gist options
  • Save shuhei/8418970 to your computer and use it in GitHub Desktop.
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.
/node_modules
/build
App =
start: ->
console.log "app started!"
module.exports = App
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');
});
App = require('./app')
App.start()
{
"name": "gulp-coffee-browserify",
"version": "0.0.0",
"description": "Sample app for gulp, CoffeeScript and Browserify",
"author": "Shuhei Kagawa <[email protected]>",
"dependencies": {
"gulp": "~3.3.1",
"gulp-concat": "~2.1.7",
"gulp-browserify": "https://github.com/deepak1556/gulp-browserify/tarball/master",
"coffeeify": "~0.5.2"
}
}
@asiniy
Copy link

asiniy commented Aug 27, 2015

Thx a lot!

@andrewmartin
Copy link

Right on!

@valentinpalkovic
Copy link

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment