Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1010 Bytes

CONTRIBUTING.md

File metadata and controls

49 lines (31 loc) · 1010 Bytes

Contribution Guide

Setting up the project

Use nvm to use the appropriate Node.js version from .nvmrc:

nvm i

Install the dependencies using npm:

npm i

Building the project

Run the build script:

npm build

The package is bundled using pkgroll (Rollup). It infers the entry-points from package.json so there are no build configurations.

Development (watch) mode

During development, you can use the watch flag (--watch, -w) to automatically rebuild the package on file changes:

npm build -w

Running the package locally

Since pkgroll knows the entry-point is a binary (being in package.json#bin), it automatically adds the Node.js hashbang to the top of the file, and chmods it so it's executable.

You can run the distribution file in any directory:

./dist/cli.mjs

Or in non-UNIX environments, you can use Node.js to run the file:

node ./dist/cli.mjs