Closed vendethiel closed 11 years ago
Can you give more detail about the desired behaviour?
Hook into cjs. Maybe add a small API for these plugins, like "addExtension", or hooks, stuff like that
Would also allow for stuff like :
cjsify src/entryfile.js --use cjsify-livescript,cjsify-stylus
And the CLI tool would require()
and .use
them, allowing to do everything from CLI.
I'm not sure we can just return JS strings from handlers atm? Might be a first step
You can return strings of JS from handlers, though it's not preferred. You might want to check out the --handler
option. You provide an extension to which it applies and the name of a module that can be require
d. Just export a function just like the one you'd give in the handlers
option. I think this is what you want.
If you can specify more than one, then yes, definitely!
Yep, just use it more than once. Closing.
Linking to #64.
Yeah, thanks, I can't close from GH mobile
Add something like "cjsify.use(coffeePlugin)"? Would allow for more code reuse and maybe specify them from the CLI ?