https://github.com/hyperweb-io/interweb-build
https://github.com/hyperweb-io/interweb-build
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/hyperweb-io/interweb-build
- Owner: hyperweb-io
- License: mit
- Archived: true
- Created: 2024-09-11T01:18:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-02T07:28:01.000Z (over 1 year ago)
- Last Synced: 2025-04-21T05:07:50.424Z (about 1 year ago)
- Language: TypeScript
- Size: 157 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Interweb Build Tools
Interweb is a collection of powerful tools designed to simplify and streamline your development process for web and TypeScript projects.
- [Packages](#packages)
- [@interweb/build](#interwebbuild)
- [@interweb/ts-json-schema](#interwebts-json-schema)
- [Development](#development)
- [Project Setup](#project-setup)
- [Running Tests](#running-tests)
- [Jest Watch Mode](#jest-watch-mode)
- [Workflow Tips](#workflow-tips)
- [License](#license)
## Packages
This monorepo contains the following packages:
### [@interweb/build](./packages/build)
[](https://www.npmjs.com/package/@interweb/build)
Interweb Build is a powerful wrapper around esbuild, designed to simplify and streamline your build process for Interweb projects.
#### Installation
```sh
npm install @interweb/build
```
[Read more about @interweb/build](./packages/build)
### [@interweb/ts-json-schema](./packages/ts-json-schema)
[](https://www.npmjs.com/package/@interweb/ts-json-schema)
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.
#### Installation
```sh
npm install @interweb/ts-json-schema
```
[Read more about @interweb/ts-json-schema](./packages/ts-json-schema)
## Development
This section explains how to set up the project for development and how to run tests.
### Project Setup
To bootstrap the project, run the following commands from the root of the monorepo:
```sh
yarn
yarn build
yarn symlink
```
This will install dependencies, build all packages, and create symlinks between them.
### Running Tests
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`:
```sh
cd ./packages/build
yarn test:watch
```
This command leverages Jest's watch mode, which provides a convenient interface for running tests.
### Jest Watch Mode
Jest watch mode offers several useful hotkeys to control test execution:
- `a` - Run all tests
- `f` - Run only failed tests
- `p` - Filter by a filename regex pattern
- `t` - Filter by a test name regex pattern
- `q` - Quit watch mode
- `Enter` - Trigger a test run
Here are some examples of how to use these hotkeys:
1. Press `p`, then type `utils` to run tests only in files with "utils" in their name.
2. Press `t`, then type `should calculate` to run only tests with "should calculate" in their description.
3. Press `a` to run all tests again after filtering.
These hotkeys make it easy to focus on specific tests or files during development.
### Workflow Tips
1. Keep the test runner in watch mode while you're developing. This provides instant feedback as you make changes.
2. Use the `p` and `t` filters to focus on the specific area you're working on. This can significantly speed up the test-debug cycle.
3. Remember to run all tests (`a`) before committing changes to ensure you haven't inadvertently broken anything elsewhere in the package.
## License
Interweb Build is [MIT licensed](./LICENSE).