Skip to content

Commit

Permalink
Add-on uses blueprint addBowerPackageToProject() hook to add ed as …
Browse files Browse the repository at this point in the history
…bower dep instead of including a pre-built version
  • Loading branch information
jayphelps committed Sep 8, 2014
1 parent d969471 commit 753e673
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 30 deletions.
26 changes: 0 additions & 26 deletions lib/ember-addon-main.js

This file was deleted.

13 changes: 13 additions & 0 deletions lib/ember-addon/blueprints/ember-data/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('ember-data', '1.0.0-beta.9');
}
};
26 changes: 26 additions & 0 deletions lib/ember-addon/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use strict';

var path = require('path');

module.exports = {
name: 'ember-data',
blueprintsPath: function() {
return path.join(__dirname, 'blueprints');
},
included: function(app) {
this._super.included(app);

var options = {
exports: {
'ember-data': [
'default'
]
}
};

this.app.import({
development: app.bowerDirectory + '/ember-data/ember-data.js',
production: app.bowerDirectory + '/ember-data/ember-data.prod.js'
}, options);
}
};
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
"ember-addon"
],
"ember-addon": {
"main": "lib/ember-addon-main.js"
"main": "lib/ember-addon/index.js"
},
"files": [
"lib/ember-addon"
],
"scripts": {
"postinstall": "bower install",
"prepublish": "ember build --output-path=dist/ember-data/ --environment production",
"start": "ember serve",
"dist": "ember build --environment production",
"dist": "ember build --environment=production",
"test": "testem -R dot ci",
"publish-build": "npm run dist && ./bin/publish_to_s3.js",
"testem-local": "testem -R dot ci",
Expand Down

0 comments on commit 753e673

Please sign in to comment.