javascript - Build ember-cli addon without dependencies -
i developed ember-cli addon works fine.
when run command ember build
, creates vendor.js
file contains addon , dependencies (ember, jquery etc...) 3mb
i'd know if it's possible export addon own (my-addon.js
) without dependencies inside, vendor can use?
i'm trying create ember-cli addon bower component can include in ember project. addon , dependencies more 100mb of info (including node modules, broccoli, tests...), when install using npm install my-addon, it's pretty big. don't need in other project, addon (dist version) couple of kb , that's need...
basically, architecture of projects:
ember project:
my-project.git
/my-project /app /controllers etc... /node_modules /my-addon //my addon lives here , contains (all node_modules, bower_components, tests... 100mb download!) brocfile.js etc..
basic architecture ember-cli addon:
my-addon.git
/my-addon /addon /app /bower_components /node_modules /tests brocfile.js etc..
package.json:
{ "name": "my-addon", "version": "0.0.1", "directories": { "doc": "doc", "test": "tests" }, "scripts": { "start": "ember server", "build": "ember build", "test": "ember test" }, "engines": { "node": ">= 0.10.0" }, "devdependencies": { "body-parser": "^1.2.0", "broccoli-sass": "0.3.2", "broccoli-asset-rev": "0.3.1", "broccoli-ember-hbs-template-compiler": "^1.6.1", "ember-cli": "0.1.2", "ember-cli-content-security-policy": "0.3.0", "ember-cli-ic-ajax": "0.1.1", "ember-cli-inject-live-reload": "^1.3.0", "ember-cli-qunit": "0.1.0", "ember-data": "1.0.0-beta.10", "ember-export-application-global": "^1.0.0", "express": "^4.8.5", "glob": "^4.0.5" } "keywords": [ "ember-addon" ], "ember-addon": { "configpath": "tests/dummy/config" } }
thanks
so, happened?
my reply be, local repo - should have junk needs process etc... final code set bower, should either branch /dist or or - github repo should have unbuilt code. then... bower install --save your-thing
- registered ember app. bower install
or update
etc - , check config - , pull in dependencies based on package.json
, bower.json
.
it great if documented findings , answered question here. bet it's pretty mutual workflow.
javascript node.js ember.js ember-cli
No comments:
Post a Comment