vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.75k stars 6.33k forks source link

naming of "vue serve" task is misleading #2039

Closed MartinMuzatko closed 6 years ago

MartinMuzatko commented 6 years ago

What problem does this feature solve?

I would like to recommend dev or start over serve. serve is likely to be interpreted as "use this script to run this app in production" Which is not the case here. Serve at its best, could be interpreted as dev-server. But who knows for sure?

As you can see - it is frustrating to remember all the tasks when switching projects.

What does the proposed API look like?

I wouldn't go and replace vue serve. That would introduce a breaking change. What would be nice, is to add an alias to have the only script that runs without a run between npm and the task name: npm start. npm start is the default script to run when developing an app. Or to run in production when running a server.

Thanks in advance. Please let me know what you think.

LinusBorg commented 6 years ago

serve is likely to be interpreted as "use this script to run this app in production"

vs.

npm start is the default script to run when developing an app. Or to run in production when running a server.

I'm not sure if this is an improvement. Since "start" can mean both things as well, what do we gain?

Mourdraug commented 6 years ago

I don't really think there is anything to gain here, not like there is harm in adding an alias, it's just matter of adding a line to package.json.

serve is likely to be interpreted as "use this script to run this app in production"

I can't really see why would people assume that. Maybe there should be more verbose warning that webpack server is not mean for production if that's the case.

yyx990803 commented 6 years ago

We are not going to make changes based on subjective preferences at this stage.

MartinMuzatko commented 6 years ago

By the way. Vuepress is also vuepress dev @yyx990803 Would you consider changing vuepress then?