Skip to content

Commit

Permalink
Added ember-addon support via npm
Browse files Browse the repository at this point in the history
  • Loading branch information
jayphelps committed Sep 5, 2014
1 parent 959bfa2 commit dc30f4c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
26 changes: 26 additions & 0 deletions lib/ember-addon-main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use strict';

module.exports = {
name: 'ember-data',
init: function(name) {
this.treePaths.vendor = 'dist';
},
included: function(app) {
this.app = app;
var options = {
exports: {
'ember-data': [
'default'
]
}
};

// 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'
}, options);
}
};
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
"namespace": "DS",
"repository": "git://github.com/emberjs/data.git",
"license": "MIT",
"keywords": [
"ember-addon"
],
"ember-addon": {
"main": "lib/ember-addon-main.js"
},
"scripts": {
"postinstall": "bower install",
"prepublish": "rm -rf dist && ember build --output-path=dist/ember-data/ --environment production",
"start": "ember serve",
"dist": "rm -rf dist && ember build --environment production",
"test": "testem -R dot ci",
"publish-build": "rm -rf dist && ember build --environment production && ./bin/publish_to_s3.js",
"publish-build": "npm run dist && ./bin/publish_to_s3.js",
"testem-local": "testem -R dot ci",
"testem-beta": "testem -f config/testem-beta.json -R dot ci",
"testem-canary": "testem -f config/testem-canary.json -R dot ci",
Expand Down

0 comments on commit dc30f4c

Please sign in to comment.