1.0.6 • Published 7 years ago

philemon v1.0.6

Weekly downloads
7
License
ISC
Repository
github
Last release
7 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

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago