Created
April 30, 2015 04:32
-
-
Save mawatari/f90b3a066a1777bca204 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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