@eclipse-lyra/create-app
v0.7.53
Published
Scaffold a new Eclipse Lyra app (monorepo with app + example extension)
Downloads
3,044
Readme
@eclipse-lyra/create-app
Scaffold a new Eclipse Lyra app with a single command.
Testing locally
From the Eclipse Lyra monorepo root, run the CLI with Node (no publish needed):
node packages/create-app/index.js my-app
# or non-interactive:
node packages/create-app/index.js my-app --yesOr use npx with the package path:
npx file:./packages/create-app my-app --yesThen cd my-app && npm run dev to run the scaffolded app.
Usage (published package)
npm create @eclipse-lyra/appWith a project name (directory):
npm create @eclipse-lyra/app my-appTo skip prompts when a project name is provided:
npm create @eclipse-lyra/app my-app -- --yesNext steps
After scaffolding:
cd my-app
npm run devFrom the created project root, npm run dev runs the app (Vite). Use npm run build and npm run preview to build and preview.
What you get
- A monorepo with two workspace packages:
packages/app– the Lyra app (Vite, core + extensions from npm).packages/example-extension– a minimal example extension you can copy or extend.
- The app registers a logo contribution on the left main toolbar (slot
start) with the textmy!app; you can change it inpackages/app/src/main.ts. - The example extension is loaded by the app and adds an "Example" view in the left side panel.
Example extension
The template includes an example extension in packages/example-extension to show how to build your own extensions without publishing a separate npm package.
src/index.ts– Registers the extension withextensionRegistry.registerExtension()(id, name, description, loader, icon). Same pattern as published extensions like@eclipse-lyra/extension-howto-systemand@eclipse-lyra/extension-utils.src/example-extension-loader.ts– Loaded when the extension is activated. Registers a TabContribution toSIDEBAR_MAIN(the left side panel), so the "Example" tab appears alongside the workspace file browser.tsconfig.json– TypeScript config for the extension (IDE and type-checking).vite.config.ts– Vite lib build; runnpm run build -w example-extensionto outputdist/when you want to publish the extension.
You can edit packages/example-extension in place, add more views or contributions, or copy it to start a new extension. The app depends on it via "example-extension": "*" in packages/app/package.json (npm links the workspace package). The app compiles the extension from source in dev; use the extension’s build script if you publish it as a separate package.
