如果一个模块在运行的时候并不需要,仅仅在开发时才需要,就可以放到devDependencies中。 这样,正式打包发布时,devDependencies的包不会被包含进来。 If a module is not needed at runtime, but only at development time, it can be placed in devDependencies. This way, packages from devDependencies will not be included in the official package release.
npm list -g --depth=0
- 首先搜索当前目录下的node_modules
- 然后在全局进行搜索
- 临时下载一个模块,最后卸载掉
NPM node package manager
NRM node registry manager
NVM node version manager
commen useful command: xxx --help
npm config lsIf the node is win32 program, Then try to change a file(See the error information)
const NRMRC = path.join(process.env.HOME, '.nrmrc')(Delete);
const NRMRC = path.join(process.env.USERPROFILE, '.nrmrc')(New);
nvm proxy http://example.com:8080 set the proxy
here is the link
npm install rimraf -g
rimraf node_modules
npm i [-g] [-d] [-s]
i indicates install
g means --global
s is --save It will write the package name to the dependency in package.json
d means --save-dev It will write the pacjage name to the dependency in package.json
The package will be added to the node_modules dir.If there is no parameter(d|s|g)
process.argv[index] in genereal,index is greater than 1.
major: New architechure.And in general, it mot be compatible with the old version minor: Add some new features as planed patch: fix some bugs
In VUE, you can customize .env.name file to indicate the profile. So you can configure multiple environments.For instance, you can set a dev-mock file for simulation data.
upgrade the package
There is an article about the tool
format tool
Not a file format. It is a useful tool to execute the ts directly.
support Option syntax like Rust.
Write more powerful script in commad line. But you must verify that your env support wsl.