-
Notifications
You must be signed in to change notification settings - Fork 10
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
Changing merge strategy #298
Comments
Hello! It's possible to do using hooks. Try to replace |
So, basically, I have to substitute content of ${pathOfInstalledConfigPackage}/.prettierrc.json to context.mergedConfigs[pathOfMyConfigFile] in "After merge" hook, right? |
Furthermore, is it possible to deliver ".sharecrc.js" within the same config package? Or the file with hooks should be added manually for every repo that uses the config? |
That's right.
Of course, you can, but updated version will be applied for next merge, not for current one. |
Ok, so there is .sharercrc.js in my repo's node_modules/my-config. When i do "npx sharec" from the root of my project the hook doesn't work. When I move it to the project's root - everything works well. Is it possible to configure sharec to get hooks from package folder? |
At this moment |
Much obliged! Have a nice day! |
Greetings! Is it possible to change merge strategy? I want to fully replace a file when applying new version of the config.
At the moment if I have the following in my main project's .prettierrc.json:
{
"tabWidth": 2,
"test": "test"
}
And the following in the corresponding file in the repo of the updated config:
{
"test": "test"
}
After installing new package and applying it via "npx sharec" I expect it to be:
{
"test": "test"
}
But in reality it results in:
{
"tabWidth": 2,
"test": "test"
}
The package's version is "3.2.1",
The text was updated successfully, but these errors were encountered: