Skip to content
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

Merged

Conversation

cherifGsoul
Copy link
Contributor

Fix #248

@coveralls
Copy link

coveralls commented Oct 23, 2017

Coverage Status

Coverage increased (+0.01%) to 98.0% when pulling 1f74200 on fix_trailing_slashes_when_running_add_component into 33cdf07 on master.

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');
Copy link
Member

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/?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chasenlehara chasenlehara changed the title fix trailig slash on component name#248 Fix trailing slash on component name Oct 23, 2017
@@ -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(/\/$/, "");
Copy link
Member

@chasenlehara chasenlehara Oct 23, 2017

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(/\/$/, "");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@coveralls
Copy link

coveralls commented Oct 24, 2017

Coverage Status

Coverage increased (+0.006%) to 97.606% when pulling 4379e67 on fix_trailing_slashes_when_running_add_component into 119c8ab on master.

@cherifGsoul cherifGsoul force-pushed the fix_trailing_slashes_when_running_add_component branch from e0f49f6 to 4379e67 Compare July 4, 2019 16:40
@cherifGsoul cherifGsoul merged commit 0347388 into master Jul 4, 2019
@cherifGsoul cherifGsoul deleted the fix_trailing_slashes_when_running_add_component branch July 4, 2019 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore trailing slashes when running donejs add component
3 participants