Skip to content
/ ni Public
forked from antfu-collective/ni

💡 Use the right package manager

License

Notifications You must be signed in to change notification settings

xsefpm/ni

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ni

npm i in a yarn project, again? F**k!

ni - use the right package manager


npm i -g @antfu/ni

ni

npm · yarn · pnpm


ni - install

ni

# npm install
# yarn install
# pnpm install
ni axios

# npm i axios
# yarn add axios
# pnpm i axios
ni @types/node -D

# npm i @types/node -D
# yarn add @types/node -D
# pnpm i @types/node -D
ni --frozen

# npm ci
# yarn install --frozen-lockfile
# pnpm install --frozen-lockfile
ni -g iroiro

# npm i -g iroiro
# yarn global add iroiro
# pnpm i -g iroiro
# ! uses default agent, regardless CWD

nr - run

nr

# npm run start
# yarn run start
# pnpm run start
nr dev --port=3000

# npm run dev -- --port=3000
# yarn run dev --port=3000
# pnpm run dev -- --port=3000

Config

; ~/.nirc

; default agent will be used for global installs 
; and the fallback when no lock found.
defaultAgent=npm

How?

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.

About

💡 Use the right package manager

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 98.6%
  • JavaScript 1.4%