hoodiehq/hoodie-server — pull request #234 by lupomontero (2014-02-14 18:20:04+00:00)
Title: Serve hoodie.js as combined stream including plugins

This should fix #174.

GET `/_api/_files/hoodie.js` now returns the hoodie.js file in `node_modules/hoodie/dist/` with the plugins concatenated at the end (as before), but now this are refreshed for every request, which is nice during development.

However, we now have to look at a different issue, the fact that the code in `node_modules/hoodie/dist/hoodie.js` is "wrapped" in a module definition injected by browserify. This means that, depending on how the script is loaded, `Hoodie` may not be defined in the global scope, and the plugins added after the main hoodie.js may not have access to `Hoodie`, which will throw an error as all plugin code is wrapped in `Hoodie.extend()`. That's a different issue and will probably need some discussion, so I'll open a new issue for that.