Twitter0

components.json

Manage the spartan configuration through components.json.

Your custom configuration for the spartan CLI is stored in a file called components.json and is located in the root of your workspace.

Note : this file is only required by the spartan CLI. If you're manually copy & pasting components, you can ignore this file.

File Generation

The components.json file is generated the first time you use the ui command.

NX Workspace Configuration

{
	"componentsPath": "libs/ui",
	"importAlias": "@spartan-ng/helm",
	"buildable": true,
	"generateAs": "library" | "entrypoint"
}

Angular CLI Project Configuration

{
	"componentsPath": "libs/ui",
	"importAlias": "@spartan-ng/helm",
}

Configuration Flags

componentsPath

The base path where your components will be generated.

importAlias

Specify the import path of the component e.g. @spartan-ng/helm.

buildable (nx only)

Determines whether the generated library is buildable or not.

generateAs (nx only)

Generate the components as a library or entrypoint.

Changelog CLI