mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 03:23:05 +00:00
38 lines
645 B
Text
38 lines
645 B
Text
% npm, node, js
|
|
|
|
# initial new package
|
|
npm init
|
|
|
|
# initial immediately a new package
|
|
npm init -y
|
|
|
|
# install all dependencies packages
|
|
npm install
|
|
|
|
# install all dev dependencies packages
|
|
npm install --save-dev
|
|
|
|
# install a specified package
|
|
npm install <package_name>
|
|
|
|
# install a specified dev package
|
|
npm install <package_name> --save-dev
|
|
|
|
# install globally a specified package
|
|
npm install <package_name> -g
|
|
|
|
|
|
|
|
% nvm, node, js
|
|
|
|
# install a specified version of node
|
|
nvm install <version>
|
|
|
|
# list available versions
|
|
nvm ls-remote
|
|
|
|
# use installed node's version
|
|
nvm use <version>
|
|
|
|
# set a node's version as default
|
|
nvm alias default <version>
|