Just a boilerplate for building a library with TS + Github action for testing.
Configured with:
- Rollup module bundler
- Typescript 4.2
- StandardJs linter and formatter
- Mocha with Chai for unit testing
- Simple example of TypeScript code and unit test
- Github Actions Test workflow
- Use
package.json
name
field as the name of the library when bundling for browsers - type definition is exposed via
types
field inpackage.json
main
entry point field withinpackage.json
targets the bundled distribution
Note: update
main
andtypes
when build directory is changed.
Automatically runs when you push to main
branch or a pull request pointing to main
branch.
see test.yml
Start the library build and test in watch mode for every file edit.
Build distribution bundle to ./build/
directory.
Lints and test library.
Uses ts-standard for linting so you don't have to worry about ESLint configurations
Automatically fixes any lint errors encountered.
Run build script in watch mode.