diff --git a/lib/ember-addon-main.js b/lib/ember-addon-main.js new file mode 100644 index 00000000000..5574e7f6cd8 --- /dev/null +++ b/lib/ember-addon-main.js @@ -0,0 +1,26 @@ +'use strict'; + +module.exports = { + name: 'ember-data', + init: function() { + 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); + } +}; \ No newline at end of file diff --git a/package.json b/package.json index d9fce8a2e3d..c197fbe161e 100644 --- a/package.json +++ b/package.json @@ -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": "ember build --output-path=dist/ember-data/ --environment production", "start": "ember serve", - "dist": "rm -rf dist && ember build --environment production", + "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",