breuleux / earl-grey

Programming language compiling to JavaScript
http://breuleux.github.io/earl-grey/
MIT License
464 stars 6 forks source link

Support usage of promisify in require #20

Closed davej closed 9 years ago

davej commented 9 years ago

I have tons of boilerplate which could be moved to require, for example:

temp-open = promisify(temp.open)
fs-read = promisify(fs.read-file)
fs-write = promisify(fs.write)
fs-close = promisify(fs.close)
replace = promisify(replace-in-file)
nginx-conf-edit = promisify(nginx-conf.NginxConfFile.create)

@breuleux's suggestion: require: fs -> (promisify! read-file, promisify! write)

breuleux commented 9 years ago

0.0.10 now allows require: fs -> (promisify! read-file, promisify! write)