[英]Installation of vue-cli : how does it work?
I'm very new to Node Package Manager and also Vue, and I'm trying to understand what exactly is going on with using the Vue CLI.我对 Node Package Manager 和 Vue 非常陌生,我试图了解使用 Vue CLI 到底发生了什么。
The vue.js website has this as instructions for running the official Vue CLI: vue.js 网站上有运行官方 Vue CLI 的说明:
I have a few questions about this:我对此有几个问题:
npm install --global vue-cli
need to be executed only once on a machine, or once on a directory, or once per new project you're starting? npm install --global vue-cli
是否只需要在机器上执行一次,或者在目录上执行一次,或者每个您正在启动的新项目执行一次? In other words, once it's on your computer, is that the last time you need to run that command, or do you need to execute this command every single new project you start? Once in a machine, except for the rare cases where one is isolating one's npm
install (such as by using nodeenv
or inside a container);一旦进入机器,除了极少数情况下隔离自己的
npm
安装(例如通过使用nodeenv
或在容器内); that's what the global
option is for.这就是
global
选项的用途。
After running npm install
, yes.运行
npm install
后,是的。
Running npm run build
and copying the contents of the resulting dist
directory to the production machine (often within a /var/www
directory or similar).运行
npm run build
并将生成的dist
目录的内容复制到生产机器(通常在/var/www
目录或类似目录中)。 This can be automated further in many ways.这可以通过多种方式进一步自动化。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.