opened
stefanpenner
username_0
Our currently solution is pretty hacky. Installing emberfire itself via bower is strange, but a limitation of the current release + build system. The dependency on firebase via bower sounds totally fine.

Additional ideas:

- [ ] include `app/adpaters/application.js` which should export the `firebase adapter` and read the configuration from `env.FIREBASE_INSTANCE`  (if the user doesn't want the main adapter to be firebase, they simply override it and inherit from whichever adapter they would prefer.
- [ ] include `addon/adapters/firebase.js` which is what `app/adapters/application.js` would import and export
- [ ] explore emberfire also adding tasks to deploy to firebase hosting environment.
- [ ] blueprint should add `dev/production` FIREBASE_INSTANCE keys to `config/environment.js`
- [ ] consider `ember generate emberfire` taking optional parameter of the `FIREBASE_INSTANCE` key, so generators can produce ready to role `config/environment.js`
improve ember-cli-addon experience
issue
created
tstirrat
username_1
@username_0 @rwjblue  I have a nice branch coming along for this: [ts-ember-cli-addon-refactor](https://github.com/firebase/emberfire/compare/ts-ember-cli-addon-refactor)

Just need to refactor `test/*` into `tests/integration/*` and I'll be pretty much ready to go.
comment
created
tstirrat
username_1
so i'm thinking of two blueprints:

`ember g emberfire` - Post install. Adds bower dependency; adds firebase ref to `config/environment.js` and echos a quick instruction on where to configure the firebase ref.
`ember g firebase-adapter <name>` - Adds an adapter at `app/adapters/<name>.js`, using the config's firebase ref

Any other thoughts on these?
comment
created
stefanpenner
username_0
I'll have some time this afternoon to review. If I don't. Please pester me until I do!
comment
created
tstirrat
username_1
I'll raise a PR on Monday
comment
created
MattMSumner
username_2
@username_1 super excited about this! Let me know if there's anything I could help with.
comment
created
MattMSumner
username_2
@username_0 I'm trying to help get some of the additional ideas checked off, I'm looking at:

* blueprint should add `dev/production` FIREBASE_INSTANCE keys to `config/environment.js`

is it ok to override the `config/environment.js` file or is there a way to edit files from a blueprint? If so could you point me in the right direction for editing files?
comment
created
tstirrat
username_1
we're pretty good on this, now. The deploy stuff will be a separate addon for ember-cli-deploy, I am working on it over the next few weeks.
comment
closed
tstirrat
username_1
issue