/**
* Looking for <engine>-ext/components/a-sweet-component
* If it doesn't exist, check if it exists in <engine>/component/a-sweet-component
*
* coreResolver()
* converts '<engine>-ext/components/a-sweet-component'
* into '<engine>/components/a-sweet-component'
*
* Since core/<engine> is a dependency in extended, its assets can be found
**/
moduleNameLookupPatterns: Ember.computed(function(){
return Ember.A([
this.mainModuleName, // look for the module in main applicationthis.defaultModuleName, // if not in main, look for the module in the engine
coreResolver // if not in engine, look for the module in core engine
]);
})
Demo
Extending core Methods
Extending Methods
// 'extended/<engine>-ext/components/path-to-component'import ModuleName from '<engine>/components/path-to-component';
export default ModuleName.extend({
methodToOverride() {
this._super(...arguments);
// Now do custom things to method
}
});