npm 初始化
by Zell Liew
由Zell Liew
初始化npm的最佳时间 (The best time to npm init)
When should you npm init
?
您应该何时启动npm init
?
Most developers run npm init
right after creating and navigating into a new project.
大多数开发人员在创建并导航到新项目后立即运行npm init
。
It makes sense to npm init
at the start of the project because we use npm to download dependencies. Once we npm init
, we can begin downloading (and saving) our dependencies.
在项目开始时对npm init
有意义,因为我们使用npm下载依赖项。 npm init
,我们就可以开始下载(并保存)我们的依赖项了。
For most projects, this workflow works.
对于大多数项目,此工作流程有效。
But if you’re creating an open source project, the best time to npm init
is slightly later. If you npm init
right after creating and navigating into the project, you’ll miss out a few…
但是,如果您要创建一个开源项目,则npm init
的最佳时间会稍晚一些。 如果您在创建并导航到项目后立即执行npm init
,则会错过一些…
翻译自: https://www.freecodecamp.org/news/the-best-time-to-npm-init-722a085813b0/
npm 初始化