0.0.5 • Published 3 years ago
urpm v0.0.5
ni
npm i in a yarn project, again? F**k!
ni - use the right package manager
npm · yarn · pnpm · bun
ni - install
ni
# npm install
# yarn install
# pnpm install
# bun installni vite
# npm i vite
# yarn add vite
# pnpm add vite
# bun add viteni @types/node -D
# npm i @types/node -D
# yarn add @types/node -D
# pnpm add -D @types/node
# bun add -d @types/nodeni --frozen
# npm ci
# yarn install --frozen-lockfile (Yarn 1)
# yarn install --immutable (Yarn Berry)
# pnpm install --frozen-lockfile
# bun install --no-saveni -g eslint
# npm i -g eslint
# yarn global add eslint (Yarn 1)
# pnpm add -g eslint
# bun add -g eslint
# 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=3000
# bun run dev --port=3000nr
# interactively select the script to run
# supports https://www.npmjs.com/package/npm-scripts-info conventionnr -
# rerun the last commandnx - execute
nx vitest
# (not available for bun)
# npx vitest
# yarn dlx vitest
# pnpm dlx vitestnu - upgrade
nu
# (not available for bun)
# npm upgrade
# yarn upgrade (Yarn 1)
# yarn up (Yarn Berry)
# pnpm updatenu -i
# (not available for npm & bun)
# yarn upgrade-interactive (Yarn 1)
# yarn up -i (Yarn Berry)
# pnpm update -inun - uninstall
nun webpack
# npm uninstall webpack
# yarn remove webpack
# pnpm remove webpack
# bun remove webpacknun -g eslint
# npm uninstall -g eslint
# yarn global remove eslint
# pnpm remove -g eslint
# bun remove -g eslintnci - clean install
nci
# npm ci
# yarn install --frozen-lockfile
# pnpm install --frozen-lockfile
# bun install --no-saveif the corresponding node manager is not present, this command will install it globally along the way.
na - agent alias
na
# npm
# yarn
# pnpm
# bunna run foo
# npm run foo
# yarn run foo
# pnpm run foo
# bun run fooChange Directory
ni -C packages/foo vite
nr -C playground devConfig
; ~/.nirc
; fallback when no lock found
defaultAgent=npm # default "prompt"
; for global installs
globalAgent=npm# ~/.bashrc
# custom configuration file path
export NI_CONFIG_FILE="$HOME/.config/ni/nirc"