-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix trailing slash on component name #270
Fix trailing slash on component name #270
Conversation
assert(fs.existsSync(path.join(tmpDir, 'src', 'past-year', 'past-year', 'past-year.less')), 'past-year.less exists'); | ||
assert(fs.existsSync(path.join(tmpDir, 'src', 'past-year', 'past-year', 'past-year.stache')), 'past-year.stache exists'); | ||
assert(fs.existsSync(path.join(tmpDir, 'src', 'past-year', 'past-year', 'past-year-test.js')), 'past-year-test.js exists'); | ||
assert(fs.existsSync(path.join(tmpDir, 'src', 'past-year', 'past-year', 'past-year.html')), 'past-year.html exists'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these point to src/basics/past-year/
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -41,10 +41,10 @@ module.exports = BaseGenerator.extend({ | |||
when: !this.options.name | |||
}).then(function(first) { | |||
var name = this.options.name = this.options.name || first.name; | |||
name = this.options.name = name.replace(/\/$/, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be combined with the above line:
var name = this.options.name = (this.options.name || first.name).replace(/\/$/, "");
…or maybe the first line could be simplified:
var name = this.options.name || first.name;
name = this.options.name = name.replace(/\/$/, "");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
e0f49f6
to
4379e67
Compare
Fix #248