How do I go about importing assets from a nested addon in a consuming application?
I currently have an addon, addonA
, that has addonB
as a dependency. When running the dummy app for addonA, addonB
's CSS is imported correctly. However, when including addonA
in an Ember app, only addonB
's CSS is added to the vendor.css file.
Ember App package.json
{
"name": "my-app",
"version": "0.0.0",
"description": "My App.",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.0.0",
"connect-restreamer": "^1.0.1",
"ember-cli": "0.2.0",
"ember-cli-app-version": "0.3.2",
"ember-cli-babel": "^4.0.0",
"ember-cli-content-security-policy": "0.3.0",
"ember-cli-dependency-checker": "0.0.8",
"ember-cli-htmlbars": "0.7.4",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-qunit": "0.3.9",
"ember-cli-uglify": "1.0.1",
"ember-data": "1.0.0-beta.15",
"ember-export-application-global": "^1.0.2",
"express": "^4.12.3",
"glob": "^4.5.3",
"morgan": "^1.5.2",
"addonA": "some/location"
}
}
addonA index.js
/* jshint node: true */
'use strict';
module.exports = {
name: 'addon-a',
included: function (app) {
this._super.included(app);
app.import('vendor/addon-a/addon-a.css');
}
};
addonB index.js
/* jshint node: true */
'use strict';
module.exports = {
name: 'addon-b',
included: function (app) {
this._super.included(app);
app.import('vendor/addon-b/addon-b.css');
}
};
Aucun commentaire:
Enregistrer un commentaire