npm init :
create your package.json file automatically
npm install [--save-dev] [package_name]:
1. Retrieves the last version of a package
2. Install itglobally, for production environment or for development environment
eg: npm 安装webpack:npm install --save-dev webpack
npm install:
Install all the packages defined in your package.json file
npm run [script_name]
1. Runs the right command lines defined in the scripts section
2. For “start” or “test” commands, keyword “run” is not needed
网友评论