This repository has a configured Dev Container for development. You can setup various editors with Dev Containers without any manual installation or configuration. For detailed instructions, see:
- Visual Studio Code (recommended)
- GitHub Codespaces (web)
Tasks are managed by the Nx build system, which automatically handles dependencies between packages, ensuring that prerequisites are run as needed. Only execute the task you actually intend to complete.
Tasks are defined in the project.json
file for each package and inherit from the workspace's nx.json file. The project name should begin with @kolint/
followed by the directory name, as specified in the project.json
file.
nx <task> <project>
# Example:
nx build @kolint/compiler
build
- Generates the package distributable, essential before releasing.
lint
- Identifies common issues in the project by running eslint.
test
- Executes unit tests for the project.
e2e
- Runs end-to-end tests, usually requiring a testing environment like a browser.
format
- Formats the project's code using prettier.
type-check
- Checks the project for typing issues using TypeScript.
Third-Party packages (dependencies) are managed by the pnpm package manager.
# Ex: make sure everything is installed.
pnpm install
# Ex: installing a dependency to a project.
pnpm add --filter <project> <package>
# Ex: installing a dev dependency to a project.
pnpm add --filter <project> --save-dev <package>
# Ex: installing a dev dependency to workspace package.
pnpm add -w --save-dev <package>
Samples are small project used to manually test the workspace packages. Visit each sample's readme for details.
packages/
- Source code for all public@kolint
packages.tools/
- Development (private) packages such as@kolint-dev/nx
and@kolint-dev/tsconfig
PNPM is a tool for managing third-party packages (dependencies). It functions similarly to npm but offers extra features and works particularly well with monorepos.
Our packages are designed to work with NodeJS. During development, Bun is used, which is a fast JavaScript runtime that's (almost) fully NodeJS backwards compatible. Bun provides a great development toolchain and nativly supports TypeScript.
Nx is a build system with built-in tooling for monorepos. It runs tasks effectivly and caches.
# Build single project
nx build @kolint/compiler
# Build all projects
nx run-many -t build