Skip to content

andyshand/bbuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bbuild

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.

Prerequisites

  • Node 18+
  • Yarn (use corepack, part of Node 18+)

Setup

1. Compile the CLI

cd reeality/compiler
yarn
yarn run build

2. Setup global bash/zsh alias, eg:

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 "$@"
}

3. Test via test-project 🤞

cd test-project
bbuild dev

Expect it to be ugly af, just a barebones test modules are being symlinked/compiled etc.

How does it work?

https://www.loom.com/share/7c34ccd68cb14695aca4ac1bc492d834

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published