microbundle-ts-pkg: A TypeScript npm package skeleton/starter project with microbundle, node:test and prettier
- SAMPLE_README.md and USE_CASES.md for documentation.
node:testrunner for testing (see ./tests)
- prettier for formatting
- microbundle for compiling TypeScript to UMD, ESM, CJS
- Node 18 (to run this repository, due to
- npm v7+
- Clone the repository
npm installinstalls all required dependencies.
npm testto run all tests.
npm run testrun tests against built output with Node.js' native
node:testmodule. Important: runs against build output so run
npm run buildbeforehand.
npm run buildrun build from TypeScript to UMD, CJS, ESM with microbundle
npm run watchruns build in watch mode with microbundle
npm run lintwill ensure all of the files are prettier-formatted
npm run formatwill run prettier formatting option on all the examples files (and tests).
npm run release, run clean, production build and release with
Special thanks to:
Code is licensed under the MIT License.