Skip to main content

Create an App

Creating a New App

  1. Scaffold out a new app by running pnpm scaffold app. This will scaffold out the requisite files and directory structure for a new app.
  2. Add code to the appropriate directories in your app and register it with the platform in your app's entry.ts file.
  3. Run pnpm add <dependency> in your new app directory to add any required dependencies.

Migrating Code From the src/ Directory

  1. Run pnpm app-migrate check and pnpm app-migrate lint in the directory in src/ you wish to migrate. These commands will flag any potential lint rule violations that must be fixed before the code can be migrated.
  2. Scaffold out a new app by running pnpm scaffold app. This will scaffold out the requisite files and directory structure for a new app.
  3. Copy over the code from src/ using git mv to preserve the code's git history.
  4. Run pnpm migrate-deps app/<appname> to automatically extract the dependencies your code requires and add the correct versions to the app's package.json. Run pnpm install once you've verified the dependencies are correct.