dispatchr icon indicating copy to clipboard operation
dispatchr copied to clipboard

Bowerify the dispatchr

Open jrust opened this issue 10 years ago • 3 comments

First off, thanks for open sourcing this! It has solved a number of problems I came across with the standard dispatcher as well as just making things much cleaner and easier to understand. That said, at this point the only way for me to use it, since I'm developing on top of rails and not node, is to copy the files over by hand into my source. It would be great if a bower.json file could be added and the code made workable for environments that don't use CommonJS. It seems like the two options are either a build task that converts the various libs into something consumable by the browser or making each file adaptable to either AMD, CommonJS, or the global object in the way EventEmitter does. Are either of these options feasible? I'd be happy to try and turn it into a PR if there's consensus on the way forward.

jrust avatar Sep 23 '14 16:09 jrust

This is definitely something we're interested in, although I don't have a lot of experience using Bower. I'll do some investigation into how we want to do it.

mridgway avatar Sep 23 '14 18:09 mridgway

@jrust You can use yahoo/dispatchr with something like

npm install --save dispatchr webpack
webpack node_modules/dispatchr/index.js bower_components/dispatchr/index.js

sheerun avatar Nov 26 '14 14:11 sheerun

Very cool, hadn't heard of webpack. @mridgway maybe that could be added to the README allowing this to be closed?

jrust avatar Nov 26 '14 16:11 jrust