-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
Commit README.md file too #347
Comments
And more in general, it would be very helpful if |
@itaisteinherz Agreed. This depends on #279. |
Why? It seems to me like this could be implemented even without having globally and locally configurable flags (e.g. using a default script that is run if configured, or an argument supplied directly to the CLI). |
I just noticed this tip in the readme, which means that @sindresorhus We should probably add tips for using |
👍 |
Sure, we could maybe add a CLI flag, but I don't want to end up with an endless amount of CLI flags. It's more readable and easier for users to add hooks as config. We'll probably need multiple hooks. |
Why not?
Totally agree with this and I also think cosmiconfig would be a good choice for this because people have different preferences for how to write configs and that's ok. It's great if I don't have to write a super-long cli command with escaped quotes inside strings, and instead I can just put all the flags into a config file of my choice... however I might also only need one or two flags and a command in an npm script is better suited for me, so why not have both a flag and a config? Then it could also be possible to pass a flag to overwrite just one setting while still respecting the rest of my config. |
@simonhaenisch I'm pretty sure that what @sindresorhus meant is that we'll add support for configuration through config files using |
I think you could solve this by amending the version commit using the {
"scripts": {
"version": "conventional-changelog", // or whatever updates the changelog
"postversion": "git add CHANGELOG.md && git commit --amend --no-edit"
}
} Or you could try to add the modified file in the {
"scripts": {
"version": "conventional-changelog && git add CHANGELOG.md",
}
} (/cc @fabianmieller) |
@simonhaenisch Thanks for the suggestions, but I already tried both and they didn't work. Sometimes the hooks never ran, and sometimes they ran after the version bump was committed. Sorry for the vague explanation, I'll try to look further into this in a few days. |
@simonhaenisch works thanks! |
Hello,
I'm updating the version in the file README.md under "npm-scripts version" and I want to add this file to the same commit.
Are there solutions for that?
Thanks
Fabian
The text was updated successfully, but these errors were encountered: