Open mulderp opened 10 years ago
Here was an initial approach at integrating this (also in the closed pull request): https://gist.github.com/katowulf/acd0b51b740782f1851e
The difficulty is that if we inject require('firebase'), the factory resolved the server NPM module 'firebase' (see https://www.npmjs.org/package/firebase ), what we would need is the client-side version of firebase (see https://www.npmjs.org/package/client-firebase ).
This means, if we inject:
require('client-firebase')
everything works great.
Here is @mulderp's working example: https://github.com/mulderp/debug/blob/master/app/main.js
All in all it would be awesome, if one would just have to do:
$ npm install backfire
then, in a file main.js:
var Backfire = require('backfire')
And have e.g. Backbone.Backfire.Collection({ firebase: 'someUrl' })
+1
+1!!
Hey all. I just added the UMD wrapper in a PR. Once they merge it It should work with requirejs and commonjs as well as the global.
Hi!
Until recently, I was using this shim to run Backfire with CommonJS support: https://github.com/cloud-walker/client-backfire
Unfortunately, the project has been deprecated. Any option to have CommonJS support built in in Backfire?
That would help running small Browserify projects like these: https://github.com/pipefishbook/pipefishbook.github.io
Thanks!