-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
💡 RFC: Default Package.json to "dev" command instead of "start" command #612
Comments
I'm in favor of this change! I think you're right that this is the most common pattern. |
I'm also for "dev". |
In my experience the start command generally refers to starting the server in production specifically |
As a -1 my main experience is w/ |
Here are the
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
}
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start"
} Vite uses "scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
} Snowpack uses "scripts": {
"start": "snowpack dev",
"build": "snowpack build"
} Microsite uses "scripts": {
"start": "microsite",
"build": "microsite build",
"serve": "microsite build --serve"
} WMR uses "scripts": {
"start": "wmr",
"build": "wmr build --prerender",
"serve": "wmr serve"
} Gatsby uses "scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"start": "npm run develop",
"serve": "gatsby serve"
} |
I think that "scripts": {
"dev": "astro dev",
"build": "astro build",
"serve": "astro serve"
} |
I have to confess it thru me at first, kinda use to typing in |
I think we’re all in favor of this! Would love a PR to make this change in our templates. |
This issue resolves to support After this change, which would you expect?
|
RFC Call: options:
Decision: #2, but we have |
Motivation
This might just bug me, and only me, but... Most frameworks I'm familiar with tend to use "dev' instead of "start" to start the development server. The Astro command is even
astro dev
notastro start
.Proposed Solution
Possible solutions
It would be great to default the package.json command to:
"dev": "astro dev",
to keep things consistent with most other modern frameworks.Then if you ever have a production preview in Astro, you could us
"start":"astro preview"
or"preview":"astro preview"
to start that process.Alternatives considered
Just leave it as is, as I might be the only one this bothers.
Risks, downsides, and/or tradeoffs
Currently the only risk is that the command doesn't match the actual astro cli command and doesn't match up with most modern frameworks today.
Detailed Design
No response
Open Questions
No response
Help make it happen!
The text was updated successfully, but these errors were encountered: