Codebase
Meteor's build system (Isobuild) and CLI structure.
Overview
Meteor is a full-stack JavaScript platform with:
- Core packages in
/packages
- Build system (Isobuild) in
/tools/isobuild
- CLI tool in
/tools/cli
- Real-time data layer via DDP
- Mobile support via Cordova
Build Pipeline
- CLI (
tools/cli/main.js) → parses commands
- Project Context (
project-context.js) → resolves packages, dependencies
- Isobuild (
tools/isobuild/)
- Bundler (
bundler.js) → orchestrates build
- Compiler (
compiler.js) → compiles packages
- Linker (
linker.js) → wraps modules
- Build plugins (Babel, TypeScript, CSS)
- Output →
star.json, programs
- Runners (
tools/runners/) → run-app.js, run-mongo.js, run-hmr.js
- Live App → DDP Server ↔ Minimongo ↔ UI
Directory Structure
tools/
├── cli/ # Command-line interface
├── isobuild/ # Build system core
├── packaging/ # Package management
├── runners/ # App execution engines
├── fs/ # File system utilities
├── cordova/ # Mobile/Cordova support
├── static-assets/ # Project templates
└── project-context.js # Dependency resolution
CLI (tools/cli/)
| File |
Description |
main.js |
Entry point, command dispatcher |
commands.js |
Main command implementations |
commands-packages.js |
Package management commands |
commands-cordova.js |
Cordova/mobile commands |
Commands: meteor create, run, build, deploy, add/remove, mongo, shell
Isobuild (tools/isobuild/)
| File |
Description |
bundler.js |
High-level bundling orchestration |
compiler.js |
Package compilation |
linker.js |
Module wrapping and linking |
import-scanner.ts |
Import statement parsing |
compiler-plugin.js |
Compiler plugin API |
isopack.js |
Package format handling |
Runners (tools/runners/)
| File |
Description |
run-app.js |
Web application runner |
run-mongo.js |
MongoDB server runner |
run-hmr.js |
Hot module reload runner |
run-all.js |
Multi-runner orchestration |
Build Targets
| Target |
Description |
web.browser |
Modern browsers |
web.browser.legacy |
Legacy browsers (IE11) |
web.cordova |
Cordova mobile apps |
server |
Node.js server |
Package Relationships
tools-core → rspack, future integrations
accounts-base → all accounts-* packages
ddp-server + ddp-client → realtime communication
mongo → minimongo (client-side)
webapp → all HTTP handling
Project Templates
Via meteor create --<template>: react, vue, svelte, angular, blaze, typescript, tailwind, solid, apollo, minimal, bare, full
Environment Variables
| Variable |
Purpose |
METEOR_PROFILE |
Build profiling |
METEOR_PACKAGE_DIRS |
Additional package paths |
METEOR_DEBUG_BUILD |
Verbose build output |
Troubleshooting
- Package not found: Check
package.js name, run meteor reset
- Build plugin not running: Check
archMatching, file extensions
- npm issues: Clear
.meteor/local/, run meteor npm install
Converted and distributed by TomeVault | Claim this content
1---2name: codebase3description: Use when understanding the build system, modifying CLI commands, working with isobuild, or navigating the tools/ directory. Covers build pipeline flow and file locations.4metadata:5 source: https://skillmd.com/skills/mahabdalla/codebase6---78# Codebase910Meteor's build system (Isobuild) and CLI structure.1112## Overview1314Meteor is a full-stack JavaScript platform with:15- **Core packages** in `/packages`16- **Build system (Isobuild)** in `/tools/isobuild`17- **CLI tool** in `/tools/cli`18- **Real-time data layer** via DDP19- **Mobile support** via Cordova2021## Build Pipeline22231. **CLI** (`tools/cli/main.js`) → parses commands242. **Project Context** (`project-context.js`) → resolves packages, dependencies253. **Isobuild** (`tools/isobuild/`)26 - Bundler (`bundler.js`) → orchestrates build27 - Compiler (`compiler.js`) → compiles packages28 - Linker (`linker.js`) → wraps modules29 - Build plugins (Babel, TypeScript, CSS)304. **Output** → `star.json`, programs315. **Runners** (`tools/runners/`) → run-app.js, run-mongo.js, run-hmr.js326. **Live App** → DDP Server ↔ Minimongo ↔ UI3334## Directory Structure3536```37tools/38├── cli/ # Command-line interface39├── isobuild/ # Build system core40├── packaging/ # Package management41├── runners/ # App execution engines42├── fs/ # File system utilities43├── cordova/ # Mobile/Cordova support44├── static-assets/ # Project templates45└── project-context.js # Dependency resolution46```4748## CLI (`tools/cli/`)4950| File | Description |51|------|-------------|52| `main.js` | Entry point, command dispatcher |53| `commands.js` | Main command implementations |54| `commands-packages.js` | Package management commands |55| `commands-cordova.js` | Cordova/mobile commands |5657**Commands:** `meteor create`, `run`, `build`, `deploy`, `add/remove`, `mongo`, `shell`5859## Isobuild (`tools/isobuild/`)6061| File | Description |62|------|-------------|63| `bundler.js` | High-level bundling orchestration |64| `compiler.js` | Package compilation |65| `linker.js` | Module wrapping and linking |66| `import-scanner.ts` | Import statement parsing |67| `compiler-plugin.js` | Compiler plugin API |68| `isopack.js` | Package format handling |6970## Runners (`tools/runners/`)7172| File | Description |73|------|-------------|74| `run-app.js` | Web application runner |75| `run-mongo.js` | MongoDB server runner |76| `run-hmr.js` | Hot module reload runner |77| `run-all.js` | Multi-runner orchestration |7879## Build Targets8081| Target | Description |82|--------|-------------|83| `web.browser` | Modern browsers |84| `web.browser.legacy` | Legacy browsers (IE11) |85| `web.cordova` | Cordova mobile apps |86| `server` | Node.js server |8788## Package Relationships8990- `tools-core` → rspack, future integrations91- `accounts-base` → all accounts-* packages92- `ddp-server` + `ddp-client` → realtime communication93- `mongo` → minimongo (client-side)94- `webapp` → all HTTP handling9596## Project Templates9798Via `meteor create --<template>`: `react`, `vue`, `svelte`, `angular`, `blaze`, `typescript`, `tailwind`, `solid`, `apollo`, `minimal`, `bare`, `full`99100## Environment Variables101102| Variable | Purpose |103|----------|---------|104| `METEOR_PROFILE` | Build profiling |105| `METEOR_PACKAGE_DIRS` | Additional package paths |106| `METEOR_DEBUG_BUILD` | Verbose build output |107108## Troubleshooting109110- **Package not found:** Check `package.js` name, run `meteor reset`111- **Build plugin not running:** Check `archMatching`, file extensions112- **npm issues:** Clear `.meteor/local/`, run `meteor npm install`113114---115> Converted and distributed by [TomeVault](https://tomevault.io) | [Claim this content](https://tomevault.io/claim/meteor/meteor)116<!-- tomevault:2.0:skill_md:2026-04-05 -->