acornjs/acorn-jsx

Browserify

Closed this issue · 3 comments

@RReverser I'm starting to develop a tern plugin for React https://github.com/angelozerr/tern-react

For the moment I can initialize acorn used inside tern with acorn-jsx.

As tern can work with Web Browser, I need to browserify the acorn-jsx. It should be very cool if you could do the same thing than acorn/dist by providing a file build-acorn_jsx.js like build-acorn.js.

Thanks!

It doesn't make sense to publish Browserified / Webpacked / ... versions for each plugin (or any npm packages) IMO. If you want to use it, why not just install modules as regular CommonJS and then bundle them together on the side of project instead of forcing package authors to prodive precompiled versions and include separate scripts on page?

Acorn does that, so I tell me why acorn-jsx doesn't do that?

Acorn is not a plugin but a generic library. It's like asking each jQuery plugin to provide browserified version while jQuery officially recommends using npm for plugins :)