- rollup (as bundler or build tool)
- typescript (for typed codebase, type extraction and type checking, cjs/esm transformation)
- eslint (for linting/formatting checks)
- prettier (for source code formatting)
- jest (for testing / coverage)
- ts-jest (for jest with ts support)
- a small cli main and option handling library under
cli/*.ts
- library files under
src/*.ts
- a library bottle file
src/index.ts
- the cli program
dist/bin.js
- the cjs library
dist/cjs/index.js
and external source mapdist/cjs/index.js.map
- the esm library
dist/esm/index.js
and external source mapdist/esm/index.js.map
- the ts type definitions
types/*.d.ts
- for simplicity and common development environment there is a
docker-compose.yml
which can be used to create a nodejs container - use
docker compose run --rm bash
to start up a container
See .github/workflows/*
.
See gitlab-ci.yml
and .gitlab/ci/*
.
- change
package.json
fieldsname
version
description
author
license
- If you want to create a cli program, change the key
resulting-binary-name
to whatever binary name you want. Otherwise, you can just remove thebin
section and thecli
. Be aware that after removingcli
some commands and configurations need to be fixed.
- run
npm install
- check operations:
npm run check
should complete without errorsnpm run lint
should complete without errorsnpm run test
should complete without errorsnpm run build
should createdist/
npm run coverage
should complete without errors and createcoverage/
npm run clean
should clean coverage & dist path
- modify / remove CI/CD configuration