Skip to content

Commit

Permalink
Merge pull request #115 from tikotzky/update-ember-cli-addon
Browse files Browse the repository at this point in the history
Refactor to use projects bower dependencies
  • Loading branch information
stefanpenner committed Sep 9, 2014
2 parents 46b6514 + 4661946 commit f818173
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 40 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ including ways to create, find, delete and query records.
EmberFire also works with the Ember CLI. Run the following command to add `emberfire.js` to your project:

```bash
$ npm install --save emberfire
$ npm install --save-dev emberfire
$ ember generate emberfire
```

Then, all you need to do is create `app/adapters/application.js` with the following content:
Expand Down
13 changes: 13 additions & 0 deletions lib/ember-addon/blueprints/emberfire/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';

module.exports = {
normalizeEntityName: function() {
// this prevents an error when the entityName is
// not specified (since that doesn't actually matter
// to us
},

afterInstall: function() {
return this.addBowerPackageToProject('emberfire', '~1.1.3');
}
};
25 changes: 25 additions & 0 deletions lib/ember-addon/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';

var path = require('path');

module.exports = {
name: 'EmberFire',

blueprintsPath: function() {
return path.join(__dirname, 'blueprints');
},

included: function included(app) {
this._super.included(app);

this.app.import({
development: app.bowerDirectory + '/firebase/firebase.js',
production: app.bowerDirectory + '/firebase/firebase-debug.js'
});

this.app.import({
development: app.bowerDirectory + '/emberfire/dist/emberfire.js',
production: app.bowerDirectory + '/emberfire/dist/emberfire.min.js'
});
}
};
38 changes: 0 additions & 38 deletions lib/ember-cli-ember-fire.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"package.json"
],
"ember-addon": {
"main": "lib/ember-cli-ember-fire.js"
"main": "lib/ember-addon/index.js"
},
"dependencies": {
},
Expand Down

0 comments on commit f818173

Please sign in to comment.