-
Notifications
You must be signed in to change notification settings - Fork 202
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
feat: remove prepublish script when creating template with Semaphore CLI #882
Conversation
The idea is to remove the prepublish script from the scripts object of the package.json file of every cli template when the template is downloaded using the CLI. BREAKING CHANGE: n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @0xshikhar it looks great! Thank you. Would you mind moving the new removePrePublishScript
function to a new file called removePrePublishScript.ts
? Similar to the getGroupIds.ts
file.
Then the function will be something like export default function removePrePublishScript(...
Hey @vplasencia, just created a separate file for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @0xshikhar! Great! Thank you!
Since the updatedPackageJsonContent
variable has the correct content, maybe it's better to use it directly to list the available scripts in line 121 instead of reading from the package.json
file again. Then that line would be:
const { scripts } = JSON.parse(updatedPackageJsonContent)
instead of:
const { scripts } = JSON.parse(readFileSync(`${currentDirectory}/${projectDirectory}/package.json`, "utf8"))
What do you think?
… readFileSync again
Hey @vplasencia, yes I also think that will be better - not to call the function again. Just updated the PR. Thanks ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @0xshikhar! Thank you very much! 🙏
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2024 Semaphore Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
feat: to remove the prepublish script from the scripts object of the package.json file of every cli template when the template is downloaded using the Semaphore CLI.
Related Issue(s)
Closes Issue#591
Checklist
yarn format
andyarn lint
without getting any errors