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

Add projectSuffix option #52

Merged
merged 9 commits into from
Jan 18, 2019
Merged

Add projectSuffix option #52

merged 9 commits into from
Jan 18, 2019

Conversation

niktekusho
Copy link
Contributor

@niktekusho niktekusho commented Nov 9, 2018

Since #35 is still open, I thought I could finally resolve it maintaining the current behavior (as of 2.0.0) of adding the 'nodejs' suffix by default.

The option for controlling it is called projectSuffix, but feel free to change it to something you think is more appropriate.

I added 3 test cases which should cover all the cases I thought of:

  1. compatibility: maintain the 2.0.0 behavior when not specifying the projectSuffix, so it will add the 'nodejs' suffix;
  2. new: specifying an empty string should disable the suffix;
  3. new: specifying a custom suffix should just use it instead of 'nodejs'.

I also updated the README with the new option specifics (added an Examples subsection).


Fixes #35

@niktekusho niktekusho changed the title 'nodejs' project dir suffix configurable Make 'nodejs' project dir suffix configurable Nov 9, 2018
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Show resolved Hide resolved
@sindresorhus sindresorhus changed the title Make 'nodejs' project dir suffix configurable Add projectSuffix option Nov 12, 2018
@niktekusho
Copy link
Contributor Author

I made major updates on the README and on test.js (as you required). I now think that maybe the examples on the README are not worth keeping since I don't think they explain the option that much better. Waiting for your review just in case. 😄

@niktekusho
Copy link
Contributor Author

Friendly bump!
(I might have messed up with the review I resolved)

@sindresorhus sindresorhus merged commit 949586a into sindresorhus:master Jan 18, 2019
@niktekusho niktekusho deleted the project-dir-suffix branch January 18, 2019 13:27
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.

Make the -nodejs suffix configurable
2 participants