-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Standardize script naming in main package.json #19949
Comments
Sharing a related tool that could be used as a baseline for the patterns: https://github.com/peerigon/scriptlint. The rules they offer for the
(italic = strict rule) |
@t-hamano, now that you wrapped up all tasks to make tooling work with Windows OS, do you think we would benefit from standardizing script naming in |
Yes, I agree with you. However, since npm script is used in various places (including GitHub Actions), I wonder how to proceed. |
I hope it's possible to do it one PR and keep old aliases for some transition period. |
I see, is this what you mean by keeping old aliases ? 🤔 {
"name": "gutenberg",
"version": "13.6.0",
"scripts": {
//new scripts
"new-dev": "npm run build:packages && concurrently \"wp-scripts start\" \"npm run dev:packages\"",
"new-build": "npm run build:packages && wp-scripts build",
// old scripts
"dev": "npm run new-dev",
"build": "npm run new-build"
}
} |
Yes, that would work as a temporary solution for a few months 👍🏻 |
Ok, then I would like to work on this issue. |
@t-hamano, excellent work tackling this task ❤️ |
During development of #19855, we struggled with the naming of new scripts, and realized there wasn't quite a standard for how scripts should be named within package.json. For example, when and why to use dash to separate parts, or when to use
:
@gziolo suggested:
This ticket opens the discussion for it so we don't forget to circle back on it.
The text was updated successfully, but these errors were encountered: