Skip to content

Commit

Permalink
Handle nested component paths correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Fulnecky committed Jan 25, 2015
1 parent 5a5f808 commit 147faf4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ var Generator = module.exports = function Generator() {
util.inherits(Generator, ScriptBase);

Generator.prototype.createComponentFiles = function createComponentFiles() {
var pathName = this.slugifiedPath.join('/') + '/' + this.dasherizedName;

this.viewTemplateUrl = 'components/' + pathName + '/' + this.dasherizedName + '.html';
this.viewClassesForScss = '.' + this.dasherizedName + '-component';
this.viewClassesForHTML = this.dasherizedName + '-component';
var targetPath = this.slugifiedPath.join('/') + '/' + this.dasherizedName;

//Mae sure path starts with a '/'
if (targetPath.indexOf('/') !== 0) {
targetPath = '/' + targetPath;
}

this.viewTemplateUrl = 'components' + targetPath + '/' + this.dasherizedName + '.html';
this.viewClassesForScss = '.' + this.dasherizedName + '-component';
this.viewClassesForHTML = this.dasherizedName + '-component';


this.generateSourceAndTest(
'component',
'spec/component',
Expand Down

0 comments on commit 147faf4

Please sign in to comment.