### Build and Start Theia Browser App Source: https://theia-ide.org/docs/composing_applications Commands to build the browser application and then start it. Access the running application via http://localhost:3000. ```bash yarn build:browser yarn start:browser ``` -------------------------------- ### Build and Start Theia Electron App Source: https://theia-ide.org/docs/composing_applications Commands to build the Electron application, which may involve rebuilding native modules, and then start it. ```bash yarn build:electron yarn start:electron ``` -------------------------------- ### Install and Scaffold Theia Project Source: https://theia-ide.org/docs/composing_applications Use Yeoman generator to scaffold a new Theia monorepo project. Ensure you have yo and generator-theia-extension installed globally. ```bash npm install -g yo generator-theia-extension mkdir my-theia-app cd my-theia-app yo theia-extension # select the 'Hello World' option and complete the prompts ``` -------------------------------- ### Install Native Dependencies Behind Proxy Source: https://theia-ide.org/docs/composing_applications Use this command when yarn install fails due to proxy issues when building native dependencies. Ensure you provide the correct path to the downloaded node-headers tarball. ```bash npm_config_tarball=/path/to/node-v8.15.0-headers.tar.gz yarn install ``` -------------------------------- ### Browser Application package.json Source: https://theia-ide.org/docs/composing_applications Configures a Theia browser application, listing core Theia modules and custom extensions. Includes scripts for bundling and starting the application. ```json { "private": true, "name": "browser-app", "version": "0.0.0", "dependencies": { "@theia/core": "latest", "@theia/editor": "latest", "@theia/filesystem": "latest", "@theia/markers": "latest", "@theia/messages": "latest", "@theia/monaco": "latest", "@theia/navigator": "latest", "@theia/preferences": "latest", "@theia/process": "latest", "@theia/terminal": "latest", "@theia/workspace": "latest", "hello-world": "0.0.0" }, "devDependencies": { "@theia/cli": "latest" }, "scripts": { "bundle": "yarn rebuild && theia build --mode development", "rebuild": "theia rebuild:browser --cacheRoot ..", "start": "theia start", "watch": "yarn rebuild && theia build --watch --mode development" }, "theia": { "target": "browser" } } ``` -------------------------------- ### Root package.json for Theia Monorepo Source: https://theia-ide.org/docs/composing_applications Defines project-wide settings, scripts for building and starting browser/Electron apps, and dev dependencies like Lerna. Specifies workspaces for the monorepo. ```json { "private": true, "engines": { "yarn": ">=1.7.0 <2", "node": ">=18" }, "scripts": { "build:browser": "yarn --cwd browser-app bundle", "build:electron": "yarn --cwd electron-app bundle", "prepare": "lerna run prepare", "postinstall": "theia check:theia-version", "start:browser": "yarn --cwd browser-app start", "start:electron": "yarn --cwd electron-app start", "watch:browser": "lerna run --parallel watch --ignore electron-app", "watch:electron": "lerna run --parallel watch --ignore browser-app" }, "devDependencies": { "lerna": "2.4.0" }, "workspaces": [ "hello-world", "browser-app", "electron-app" ] } ``` -------------------------------- ### Electron Application Configuration Source: https://theia-ide.org/docs/composing_applications Defines a Theia application for Electron. The package.json is similar to the browser app but specifies 'electron' as the target. ```json { "name": "electron-app", ... "theia": { "target": "electron" } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.