Skip to content

Instantly share code, notes, and snippets.

@mawatari
Created April 30, 2015 04:32
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 mawatari/f90b3a066a1777bca204 to your computer and use it in GitHub Desktop.
Save mawatari/f90b3a066a1777bca204 to your computer and use it in GitHub Desktop.
gulp = require('gulp')
fs = require('fs');
path = require('path');
config = require('../config')
yellow = '\u001b[33m'
reset = '\u001b[0m'
gulp.task 'ls', ->
console.log(yellow + taskList().join(' ') + reset)
gulp.task 'll', ->
console.log(yellow + taskList().join("\n") + reset)
taskList = ->
fileList = []
files = fs.readdirSync(config.tasks)
files.filter((file) ->
/.*\.coffee/.test(file)
).forEach (file) ->
fileList.push path.basename(file, '.coffee')
return fileList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment