Use this template to create npm package with executables.
- NodeJS
- pnpm
├── examples
├── scripts
└── src
├── bin
└── lib
Each folder in the examples
folder is a usage demo of this package.
In each example, a README.md
file will explain specific details for that example.
Development scripts for this project.
This project source code.
Each file in the src/bin
directory is built using pnpm run build
command to dist
directory.
Files in src/lib
directory are available for import under @lib/
. For example import {...} from "@lib/bump/version"
The files in src/bin
and src/lib
are just for demonstration purposes, remove them when using this template.
When installing this package via npm, the executables that are available are only the ones that are declared in package.json
→bin
property.
pnpm run format:check
- only check formattingpnpm run format:write
- fix formattingpnpm run typecheck
- check typescript rulespnpm run test
- not yet implementedpnpm run build
- builds source todist
folder and installs it in each example (see Examples section)pnpm run status
- checks project status (format + typecheck + build passes)