0.7.1 • Published 5 years ago
@vltansky/ni v0.7.1
ni
npm i in a yarn project, again? F**k!
ni - use the right package manager
npm · yarn · pnpm
ni - install
ni
# npm install
# yarn install
# pnpm installni axios
# npm i axios
# yarn add axios
# pnpm i axiosni @types/node -D
# npm i @types/node -D
# yarn add @types/node -D
# pnpm i @types/node -Dni --frozen
# npm ci
# yarn install --frozen-lockfile
# pnpm install --frozen-lockfileni -g iroiro
# npm i -g iroiro
# yarn global add iroiro
# pnpm i -g iroiro
# this uses default agent, regardless your current working directorynr - run
nr dev --port=3000
# npm run dev -- --port=3000
# yarn run dev --port=3000
# pnpm run dev -- --port=3000nr
# interactively select the script to runnx - execute
nx jest
# npx jest
# yarn dls jest
# pnpx jestnu - upgrade
nu
# npm upgrade
# yarn upgrade
# pnpm upgradenu -i
# (not available for npm)
# yarn upgrade-interactive
# pnpm upgrade -inci - clean install
nci
# npm ci
# yarn install --frozen-lockfile
# pnpm install --frozen-lockfileif the corresponding node manager is not present, this command will install it globally along the way.
nrm - remove
nrm axios
# npm uninstall axios
# yarn remove axios
# pnpm remove axiosnrm @types/node -D
# npm uninstall @types/node -D
# yarn remove @types/node -D
# pnpm remove @types/node -Dnrm -g iroiro
# npm uninstall -g iroiro
# yarn global remove iroiro
# pnpm remove -g iroiro
# this uses default agent, regardless your current working directoryConfig
; ~/.nirc
; fallback when no lock found
defaultAgent=npm # default "prompt"
; for global installs
globalAgent=npmHow?
ni assumes that you work with lockfiles (and you should)
Before it runs, it will detect your yarn.lock / pnpm-lock.yaml / package-lock.json to know current package manager, and runs the corresponding commands.