microbundle-ts-pkg-example
v0.0.1
Published
A TypeScript npm package skeleton/starter project with microbundle, node:test and prettier
Downloads
3
Readme
microbundle-ts-pkg: A TypeScript npm package skeleton/starter project with microbundle, node:test and prettier
Comes with:
- SAMPLE_README.md and USE_CASES.md for documentation.
- built-in
node:test
runner for testing (see ./tests) - prettier for formatting
- microbundle for compiling TypeScript to UMD, ESM, CJS
Requirements
- Node 18 (to run this repository, due to
node:test
usage) - npm v7+
Setup
- 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 scripts
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
.
About
This package is maintained by Hugo from Code with Hugo and Alpine.js Weekly.
Acknowledgments
Special thanks to:
- The developers behind
LICENSE
Code is licensed under the MIT License.