microbundle-ts-pkg: A TypeScript npm package skeleton/starter project with microbundle, node:test and prettier
Comes with:
- built-in
node:test
runner for testing (see ./tests) - prettier for formatting
- microbundle for compiling TypeScript to UMD, ESM, CJS
- Node 18 (to run this repository, due to
node:test
usage) - npm v7+
- Clone the repository
- Run
npm install
installs all required dependencies. - Run
npm run build
to build from TypeScript to common JavaScript distribution formats. - Run
npm test
to run all tests.
npm run test
run tests against built output with Node.js' nativenode:test
module. Important: runs against build output so runnpm run build
beforehand.npm run build
run build from TypeScript to UMD, CJS, ESM with microbundlenpm run watch
runs build in watch mode with microbundlenpm run lint
will ensure all of the files are prettier-formattednpm run format
will run prettier formatting option on all the examples files (and tests).npm run release
, run clean, production build and release withnp
.
Special thanks to:
- The developers behind
Code is licensed under the MIT License.