Configuration > Workspace

Workspace Configuration

Configuration for a workspace is defined in a file in its directory or in its package.json file.

See workspace aliases and script execution order for more information on the fields available.

Type Definition

{
  alias?: string | string[],
  scripts?: {
    [script: string]: {
      order?: number
    }
  }
}

Examples:

1. JSON/JSONC file

path/to/your/workspace/bw.workspace.json or path/to/your/workspace/bw.workspace.jsonc

{
  "alias": "myApp",
  "scripts": {
    "start": {
      "order": 10
    },
    "test": {
      "order": 20
    }
  }
}

2. package.json

path/to/your/workspace/package.json
{
  "name": "@my-organization/my-application",
  "description": "My app",
  "version": "1.0.0",
  "bw": {
    "alias": "myApp",
    "scripts": {
      "start": {
        "order": 10
      },
      "test": {
        "order": 20
      }
    }
  }
}

Config File (bw.json)

DEPRECATED: Use the new workspace configuration above instead to configure workspace aliases.

For the meantime, this configuration file will still take effect and merge aliases with the new configuration if present.

You can create a config file at bw.json in your project root, or you can pass a config file to the CLI with the --config-file (or -c) option.

Example config

In this config, "app-a" is an alias for package "@my-org/application-a" and "app-b" is an alias for package "@my-org/application-b".

The default log level can be set for the CLI as well.

{
  "project": {
    "workspaceAliases": {
      "appA": "@my-org/application-a",
      "appB": "@my-org/application-b"
    }
  },
  "cli": {
    "logLevel": "error"
  }
}