Skip to content

Instantly share code, notes, and snippets.

@5alamander
Last active October 31, 2016 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 5alamander/20ef6dac7ca257e408d65585edd13d96 to your computer and use it in GitHub Desktop.
Save 5alamander/20ef6dac7ca257e408d65585edd13d96 to your computer and use it in GitHub Desktop.
customize gulp file
through = require('through2')
gulp.task 'src', ->
gulp.src './src/*.coffee'
.pipe coffee({bare: true})
.pipe gulp.dest('./dest/')
.pipe through.obj((file, encoding, callback) ->
callback(null, doSomethingWithTheFile(file))
)
.on 'error', gutil.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment