Specify filename with CLI options#6
Specify filename with CLI options#6mantoni merged 2 commits intojavascript-studio:masterfrom crookedneighbor:specify_filename_with_options
Conversation
|
I recommend using the no white space link (https://github.com/javascript-studio/studio-changes/pull/6/files?w=1) to review, so it's easier to parse the actual changes. |
|
Thanks for the pull request! I'm not concerned about breaking the API. It's not yet officially documented. However, I'd rather simply treat the module as the single instance that holds all state. While this might be bad design in other cases, the purpose of this module is a vey focused and short lived task. So, how about just adding a function to change the default file name? |
|
Sure. Will try to do it this week. |
|
I've made the requested changes. Let me know if you need anything else. |
bin/cmd.js
Outdated
|
|
||
| Options are ... | ||
| -f, --file [FILENAME] Specify the name of the changelog file. Defaults to CHANGES.md. | ||
| -h, --help Dispaly this help message. |
| `; | ||
| /* eslint-enable */ | ||
|
|
||
| if (argv.h || argv.help) { |
There was a problem hiding this comment.
Did you know that minimist has an alias option?
|
Thanks, also for adding the I'd like to keep your separate commits for the help message and the file option. Would you mind removing the first, obsolete commit? Let me know if I can help with editing the history. |
|
Typo fixed and commits re-written. Let me know if you need anything else. |
|
Thanks a lot, great work! Released in v1.1.0. |
Set up changes to be an instance of a Changes function. This is technically a breaking change if this module is being used programatically. If you'd prefer not to do a major version bump, I can rewrite it to not be a breaking change, but the code is messier (as you either need to pass in the file name to both methods, or provide some new method to set a variable for the file name.
Also added a help message.