katowulf / mockfirebase

Firebase mock library for writing unit tests (experimental)
157 stars 40 forks source link

Use Browserify to build #14

Closed bendrucker closed 10 years ago

bendrucker commented 10 years ago

@katowulf just wanted to sync w/ you on this — was thinking of doing it this weekend. Would allow the UMD wrapper to be eliminated from src. Also would make it easy to split MockFirebase and MockFirebaseSimpleLogin into separate modules for convenience. This is a big enough change that I just wanted to check if you had any big things on a local branch to save a big merge headache.

katowulf commented 10 years ago

There are none. Feel free.

Low pri: I don't really see a big advantage to including MF and MFSL separately for testing. The extra bytes seem trivial. Did you have a use case for splitting them?

bendrucker commented 10 years ago

Cool. Only reason to split the two across two modules would be readability. By modules I mean Node modules. Basically one file becomes:

// index.js
exports.MockFirebase = require('./firebase');
exports.MockFirebaseSimpleLogin = require('./simple-login');

So actually it's more bytes when index.js is browserified, but for version control, coverage reporting, etc. it's easier to separate the two modules.

katowulf commented 10 years ago

That seems fine. Should make sure these work in a browser as well when we're done.