Interweb is a collection of powerful tools designed to simplify and streamline your development process for web and TypeScript projects.
This monorepo contains the following packages:
Interweb Build is a powerful wrapper around esbuild, designed to simplify and streamline your build process for Interweb projects.
npm install @interweb/build
Read more about @interweb/build
Interweb TS JSON Schema is a powerful wrapper around ts-json-schema-generator, designed to simplify the process of generating JSON schemas from TypeScript files in Interweb projects.
npm install @interweb/ts-json-schema
Read more about @interweb/ts-json-schema
This section explains how to set up the project for development and how to run tests.
To bootstrap the project, run the following commands from the root of the monorepo:
yarn
yarn build
yarn symlink
This will install dependencies, build all packages, and create symlinks between them.
To run tests for a specific package, navigate to the package directory and use the test:watch
script. For example, to run tests for @interweb/build
:
cd ./packages/build
yarn test:watch
This command leverages Jest's watch mode, which provides a convenient interface for running tests.
Jest watch mode offers several useful hotkeys to control test execution:
a
- Run all testsf
- Run only failed testsp
- Filter by a filename regex patternt
- Filter by a test name regex patternq
- Quit watch modeEnter
- Trigger a test run
Here are some examples of how to use these hotkeys:
- Press
p
, then typeutils
to run tests only in files with "utils" in their name. - Press
t
, then typeshould calculate
to run only tests with "should calculate" in their description. - Press
a
to run all tests again after filtering.
These hotkeys make it easy to focus on specific tests or files during development.
- Keep the test runner in watch mode while you're developing. This provides instant feedback as you make changes.
- Use the
p
andt
filters to focus on the specific area you're working on. This can significantly speed up the test-debug cycle. - Remember to run all tests (
a
) before committing changes to ensure you haven't inadvertently broken anything elsewhere in the package.
Interweb Build is MIT licensed.