On Friday, February 22, 2013 5:10:34 PM UTC-8, Mark Hahn wrote: > Ouch. I guess I will have to live with the old version until new add-ons > support --watch and coffee-script. Can't live without them and don't have > time to write my own. > > Sorry to be one the complainers you predicted. >
Now in v2.3 there's a `.transform()` api for all those who missed coffee-script from the <v2 days. https://github.com/substack/node-browserify#btransformtr >From the command-line compiling coffee-script is now as simple as: browserify -c 'coffee -sc' main.coffee > bundle.js Transforms are a much more general-purpose solution that will let people build a lot of really interesting user-space experiments. For an example here's a plugin I wrote that inlines `fs.readFileSync()` calls with file contents: https://github.com/substack/brfs To use a transform plugin like brfs, you just do: browserify -t brfs main.js > bundle.js The best part of the new transform functionality is how transforms are module-scoped: the transforms you load aren't applied to modules from node_modules you require() and when modules from node_modules use transforms, those transforms won't affect your code. This isolation means that module consumers won't need to care and mostly won't even notice that packages they use are using transforms to do fancy things like loading static assets or other tricks. Packages can just set a `"browserify": { "transform": [ "plugin1", "plugin2", ... ] }` in their package.json to specify the transforms they want to use. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
