Elffuss BraidHub

kikocis/continue public

main · 2.4 KiBSourceRawPermalink

Build Process Documentation

Overview

The Continue CLI uses esbuild to bundle the application along with local packages (@continuedev/config-yaml and @continuedev/openai-adapters) into a single distributable file. This ensures that users who install the CLI from npm don't need to worry about local file references.

Build Steps

  1. Install dependencies: npm install
  2. Build: npm run build
    • This first builds the local packages
    • Then bundles everything with esbuild

How it Works

Bundling Strategy

The build.mjs script uses esbuild to:

Key Features

Testing

Smoke Tests

Run smoke tests to verify the build:

npm run test:smoke

The smoke tests verify:

Troubleshooting

Common Issues

  1. Module not found errors: Check if the module needs to be added to the external list in build.mjs
  2. Native module issues: Native modules should be marked as external
  3. Bundle too large: Review bundled packages in dist/meta.json and consider marking large packages as external

Analyzing the Bundle

After building, check dist/meta.json to see:

Publishing

When publishing to npm:

  1. The bundled files in dist/ are included
  2. Users install via npm install -g @continuedev/cli
  3. The cn command becomes available globally
  4. No local file references or missing dependencies