logo

Babylon.js Market

Members Only

Documentation

8 sections walk through everything Members Only ships with. Each one starts with a quick read; click through when you need depth.

  1. 01
    01

    Overview

    Members Only is the publishing pipeline for BabylonJS Market. You wrote a component in your project, it matured, you want others to use it — this is the tool that gets it there. Underneath it is bjs inject, the reverse of arcade eject.

    Learn more →
  2. 02
    02

    Install and First Run

    Members Only ships as a subcommand of @babylonjsmarket/cli. Install the CLI once globally, log in once, and the bjs inject command is on your $PATH for every project you have.

    Learn more →
  3. 03
    03

    Anatomy of a Component

    bjs inject reads src/components/<Name>/ and copies what it finds into the pro package. The folder shape is the same one arcade eject produces and the same one @babylonjsmarket/arcade ships with — it's the lingua franca of this ecosystem.

    Learn more →
  4. 04
    04

    Target Selection

    bjs inject routes into one of two namespaces. The choice — arcade or viz — is the first thing the tool resolves, and the rest of the run depends on it.

    Learn more →
  5. 05
    05

    Inject in Practice

    A worked example, end to end. The component is Bouncer — a small Component+System pair that reflects an entity's velocity off a surface normal. It lives in your project. You want it in the arcade library.

    Learn more →
  6. 06
    06

    Publish as a Product

    bjs inject is step 1 of 3 in the member publishing flow. By itself it submits your component for curator review. The product page — the thing buyers see, the thing that takes payment — comes from steps 2 and 3.

    Learn more →
  7. 07
    07

    Round-trip with Eject

    Once your component is in the @babylonjsmarket/arcade library, a downstream consumer can pull it into their project the same way they pull anything else out of the arcade library — with arcade eject. The shape of that round-trip is the contract you sign by publishing.

    Learn more →
  8. 08
    08

    Troubleshooting

    The errors bjs inject actually emits, in the order you're most likely to see them, with what they mean and what to do.

    Learn more →

Reverse of arcade eject

If you've used `arcade eject` to pull a component out of the library for editing, you already know the shape. bjs inject runs the same rewrites in the other direction: imports come back to package subpaths, the project copy stays valid, and your new home is one of the two library namespaces — arcade or viz.

Reverse of arcade eject

Auto-detect target

Run `bjs inject Foo` and the tool decides whether Foo belongs in arcade or viz. A file extending `PanelDebuggerSystem`, a file importing `@babylonjsmarket/viz`, or a Solid `.tsx` tips the routing. Override with `--target` when you know better.

Auto-detect target

Per-layer routing for viz

viz is flat: every file lives under `core`, `solid`, or `ecs`. The tool reads each `.ts`/`.tsx` and routes it on the spot — Solid panels to `solid`, System and Component subclasses to `ecs`, the rest to `core`. Tests follow their subject's layer.

Per-layer routing for viz

Registry + barrel patched for you

arcade injection appends a lazy resolver line to `src/registry.ts`. viz injection appends `export * from './<File>';` to the matching layer barrel. Both patches are idempotent: re-running the same inject doesn't duplicate entries.

Registry + barrel patched for you

Dry-run preview

Pass `--dry-run` to see the full plan with zero writes — the resolved target, the closure of components that come along for the ride, every file that would be copied, every registry line that would land. Confidence first, edits second.

Dry-run preview

Symmetric round-trip with eject

Once your component lives in the arcade or viz library, a downstream consumer can pull it back into their project with `arcade eject <YourThing>`. Imports rewrite symmetrically. Their copy is editable; your published copy keeps living in the library. The round-trip is the contract.

Symmetric round-trip with eject

Was this page helpful?

We read every note — tell us what's working and what isn't.

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search