1.0.6 • Published 6 years ago

philemon v1.0.6

Weekly downloads
7
License
ISC
Repository
github
Last release
6 years ago

Why

npm / pnpm

Scripts need to be prefixed with run (with few exceptions) and arguments need to be separated with double dashes:

npm run lint -- --help

Unfortunately npx only runs bins but doesn't improve scripts.

Docs: https://docs.npmjs.com/cli/run-script

Yarn

Yarn is more concise and allows directly running scripts and passing arguments:

yarn lint --help

Docs: https://yarnpkg.com/lang/en/docs/cli/run

Conclusion

To use npm with the same brevity as Yarn, use Philemon as a wrapper.

Install

npm i -g philemon

Alias npm/pnpm to run through Philemon:

alias npm="philemon npm"
alias pnpm="philemon pnpm"

Usage

Depending on your alias you can now use npm with the short syntax:

npm lint --help

Built-in commands are preserved:

npm bin
npm -v

Logo made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago