Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Aliases for npm, pnpm, Yarn and Lerna. Little abstraction if their own CLI grammar with commands r, i, i-force, dep, dev, global and u.
alias npm-r="npm run"
alias npm-i="npm install"
alias npm-i-force="rm -rf node_modules && rm package-lock.json && npm-i"
alias npm-dep="npm install --save"
alias npm-dev="npm install --save-dev"
alias npm-global="npm install --global"
alias npm-u="npm uninstall"
alias pnpm-r="pnpm run"
alias pnpm-i="pnpm install --child-concurrency=8"
alias pnpm-i-force="rm -rf node_modules && rm shrinkwrap.yaml && pnpm-i"
alias pnpm-dep="pnpm install --save"
alias pnpm-dev="pnpm install --save-dev"
alias pnpm-global="pnpm install --global"
alias pnpm-u="pnpm uninstall"
alias yarn-r="yarn run"
alias yarn-i="yarn install --check-files --audit"
alias yarn-i-force="rm -rf node_modules && rm yarn.lock && yarn-i"
alias yarn-dep="yarn add"
alias yarn-dev="yarn add --dev"
alias yarn-global="yarn global add"
alias yarn-u="yarn remove"
alias lerna-r="lerna run"
alias lerna-x="lerna exec --"
alias lerna-i="lerna bootstrap --hoist"
alias lerna-dep="lerna add"
alias lerna-dev="lerna add --dev"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment