Skip to content

Commit

Permalink
fix(feature): check extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedshuhel committed Mar 18, 2016
1 parent fbf9a72 commit 4bfd6c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/framework-configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,15 @@ export class FrameworkConfiguration {
* @return Returns the current FrameworkConfiguration instance.
*/
feature(plugin: string, config?: any): FrameworkConfiguration {
if(hasExt(plugin)) {
return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} });
}

return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} });

function hasExt(name) {
return (plugin.split('.')).length > 1;
}
}

/**
Expand Down

0 comments on commit 4bfd6c4

Please sign in to comment.