Creating a new application

Note: this documentation is for a beta release of Caplin Trader 5. Features may change before the final release.

This page provides instructions on how to use the Caplin CLI to create scaffolding for a new application.

Contents:

Requirements

Caplin Trader 5 applications are created within the context of a Caplin Trader development workspace. For more information on creating a development workspace, see Creating a new workspace.

Creating a new application

You create a package using Caplin CLI's create-app command:

caplin-cli create-app <application-name>

To create a new application called MyApp, for example, follow the steps below:

  1. From the root directory of your development workspace, run the command below to create an application called MyApp:

    caplin-cli create-app MyApp
    

    Your new application has the following structure:

    ct5-workspace/apps/MyApp/
    ├── .babelrc
    ├── .env
    ├── index.html
    ├── package.json
    ├── README.md
    ├── scripts/
    │   └── build.js
    ├── server/
    │   └── node/
    │       └── server.js
    ├── src/
    │   ├── config/
    │   │   ├── aliases.js
    │   │   ├── aliases-test.js
    │   │   └── metadata.js
    │   ├── example/
    │   │   ├── Example.js
    │   │   └── __tests__/
    │   │       └── ExampleTest.js
    │   ├── index.js
    │   └── index.scss
    └── webpack.config.js
  2. Change directory to apps/MyApp, and run the command below to download project dependencies:

    npm install