CLI command to compile JS for code components

Created on 20 May 2025, about 2 months ago

Overview

The CLI tool needs to be able to compile the JavaScript code of local components written in Preact/React.

→ See: 🌱 [Meta] CLI tool for code components Active

Proposed resolution

  1. Implement this command using the relevant part of the implementation as a reference from the POC: https://github.com/lauriii/experience-builder-cli/blob/main/src/commands.... Use @clack/prompts.
  2. Read the location for your local directory for components from an environment variable or .env file established in 📌 Set up first authenticated request from CLI Postponed .
  3. Allow users to select components interactively or passed as a CLI argument. Make sure there is an option to select all.
  4. Make sure to match how the compiling is done in the XB app using SWC.
  5. Write the output to `dist/index.js` inside the directory of every component.
  6. Extend the upload command ( CLI command to upload code components Postponed ) to run this compilation, and upload the compiled JS for the component(s).
Feature request
Status

Postponed

Version

0.0

Component

CLI Tool

Created by

🇳🇱Netherlands balintbrews Amsterdam, NL

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024