bbuild is a CLI tool for compiling, running and building Typescript projects.
The primary purpose of the tool is to provide a unified way to run all of our projects, without having to learn individual setup for each.
- Node 18+
- Yarn (use corepack, part of Node 18+)
cd reeality/compiler
yarn
yarn run build
This allows you to call bbuild
from anywhere.
PATH_TO_BBUILD=/your/path/to/bbuild/reeality/compiler # This is the path to the bbuild folder on your machine
RAM_LIMIT=16384 # Configure accordingly
function bbuild () {
# Record the current directory
original_dir=$(pwd)
# Temporarily change directory to the path to bbuild
cd $PATH_TO_BBUILD
# Build the compiler first
yarn run build
# Go back to the original dir
cd "${original_dir}"
# Run the bbuild command, appending the arguments
node --max-old-space-size=$RAM_LIMIT --experimental-specifier-resolution=node $PATH_TO_BBUILD/dist/esm/compiler/index.js "$@"
}
cd test-project
bbuild dev
Expect it to be ugly af, just a barebones test modules are being symlinked/compiled etc.