Skip to content

Commit

Permalink
add-on uses bower tree so consumers can override ember-data version n…
Browse files Browse the repository at this point in the history
  • Loading branch information
jayphelps committed Sep 7, 2014
1 parent d969471 commit 9e9d866
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/ember-addon-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
module.exports = {
name: 'ember-data',
init: function() {
this.treePaths.vendor = '../dist';
// Using the `bower` tree so that if consumers want to override the
// version of ember-data they can simply by normal `bower install` means.
this.treePaths.bower = '../dist';
},
included: function(app) {
this.app = app;
Expand All @@ -15,12 +17,9 @@ module.exports = {
}
};

// This will use the pre-built version distributed with our package
// but still allow consumers to bower install their own version that
// will override ours.
this.app.import({
development: 'vendor/ember-data/ember-data.js',
production: 'vendor/ember-data/ember-data.prod.js'
development: app.bowerDirectory + '/ember-data/ember-data.js',
production: app.bowerDirectory + '/ember-data/ember-data.prod.js'
}, options);
}
};

0 comments on commit 9e9d866

Please sign in to comment.