Skip to content

Instantly share code, notes, and snippets.

@egoist
Created March 9, 2015 17:09
Show Gist options
  • Select an option

  • Save egoist/cf737f1225b6b8b433ce to your computer and use it in GitHub Desktop.

Select an option

Save egoist/cf737f1225b6b8b433ce to your computer and use it in GitHub Desktop.
An example gulpfile.coffee
gulp = require 'gulp'
coffee = require 'gulp-coffee'
stylus = require 'gulp-stylus'
jade = require 'gulp-jade'
paths =
app: './',
core: './core/*.coffee',
coffee: './assets/coffee/*.coffee',
stylus: './assets/stylus/*.styl',
jade: './assets/jade/*.jade',
js: './assets/js',
css: './assets/css',
html: './assets/html'
gulp.task 'coffee', ->
gulp.src paths.coffee
.pipe coffee bare: true
.pipe gulp.dest paths.js
gulp.task 'core', ->
gulp.src paths.core
.pipe coffee bare: true
.pipe gulp.dest paths.app
gulp.task 'stylus', ->
gulp.src paths.stylus
.pipe stylus compress: true
.pipe gulp.dest paths.css
gulp.task 'jade', ->
gulp.src paths.jade
.pipe jade()
.pipe gulp.dest paths.html
gulp.task 'watch', ->
gulp.watch paths.core, ['core']
gulp.watch paths.coffee, ['coffee']
gulp.watch paths.stylus, ['stylus']
gulp.watch paths.jade, ['jade']
gulp.task 'build', ['coffee', 'core', 'stylus', 'jade']
gulp.task 'default', ['build', 'watch']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment