nuke/docs/docs/developer/local-dev.md
Xe Iaso df27a96f1f
make a half-baked tarball (#221)
* make a half-baked tarball

Closes #217

Signed-off-by: Xe Iaso <me@xeiaso.net>

* make two tarballs: one with just the vendor, and one with vendor and npm

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-06 12:44:52 +00:00

2 KiB

title
Local development

:::note

TL;DR: npm ci && npm run dev

:::

Anubis requires the following tools to be installed to do local development:

  • Go - the programming language that Anubis is written in
  • esbuild - the JavaScript bundler Anubis uses for its production JS assets
  • Node.JS & NPM - manages some build dependencies
  • gzip - compresses production JS (part of coreutils)
  • zstd - compresses production JS
  • brotli - compresses production JS

If you have Homebrew installed, you can install all the dependencies with one command:

brew bundle

If you don't, you may need to figure out equivalents to the packages in Homebrew.

Running Anubis locally

npm run dev

Or to do it manually:

  • Run npm run assets every time you change the CSS/JavaScript
  • go run ./cmd/anubis with any CLI flags you want

Building JS/CSS assets

npm run assets

If you change the build process, make sure to update build.sh accordingly.

Production-ready builds

npm run container

This builds a prod-ready container image with ko. If you want to change where the container image is pushed, you need to use environment variables:

DOCKER_REPO=registry.host/org/repo DOCKER_METADATA_OUTPUT_TAGS=registry.host/org/repo:latest npm run container

Building packages

For more information, see Building native packages is complicated and #156: Debian, RPM, and binary tarball packages.

Install yeet:

:::note

yeet will soon be moved to a dedicated TecharoHQ repository. This is currently done in a hacky way in order to get this ready for user feedback.

:::

go install within.website/x/cmd/yeet@v1.13.4

Install the dependencies for Anubis:

npm ci
go mod download

Build the packages into ./var:

yeet