Skip to main content

Canvas

The commands in this section are available when the following packages are installed:

  • @uniformdev/cli
  • @uniformdev/canvas

Component commands

Get component

uniform canvas component get <id>
command
Fetch a component definition from the Uniform project.
+ show options

List components

uniform canvas component list
command
List component definitions from the Uniform project.
+ show options

Pull component

uniform canvas component pull <directory or file path>
command
Fetch all component definitions from the Uniform project and save them locally.
  • If a directory path is specified, a separate file is created for each component.
  • If a file path is specified, all component definitions are saved in a single file.
+ show options
tip

If file name is specified, CLI will override only corresponding part of it (e.g. pulling Project Map will only override project map section, but leave Canvas section in the same file intact). It allows you to create single file containing whole project export (Canvas + Context + Project Map). Not recommended for big projects. Check for more here

Push component

uniform canvas component push <directory or file path>
command
Insert or update all component definitions from local disk to the Uniform project.
  • If a directory path is specified, the components defined in the files in the directory used.
  • If a file path is specified, the components in the file are used.
+ show options

Remove component

uniform canvas component remove <id>
command
Delete a component definition from the Uniform project.
+ show options

Update component

uniform canvas component update <filename>
command
Insert or update a component definition from a local file to the Uniform project.
+ show options

Composition commands

Get composition

uniform canvas composition get <id>
command
Fetch a composition definition from the Uniform project.
+ show options

List compositions

uniform canvas composition list
command
List composition definitions from the Uniform project.
+ show options

Pull composition

uniform canvas composition pull <directory or file path>
command
Fetch all composition definitions from the Uniform project and save them locally.
  • If a directory path is specified, a separate file is created for each composition.
  • If a file path is specified, all composition definitions are saved in a single file.
+ show options
tip

If file name is specified, CLI will override only corresponding part of it (e.g. pulling Project Map will only override project map section, but leave Canvas section in the same file intact). It allows you to create single file containing whole project export (Canvas + Context + Project Map). Not recommended for big projects. Check for more here

Push composition

uniform canvas composition push <directory or file path>
command
Insert or update all composition definitions from local disk to the Uniform project.
  • If a directory path is specified, the compositions defined in the files in the directory used.
  • If a file path is specified, the components in the file are used.
+ show options
info

It is important to understand the concept of composition state when using this command or else you might get unexpected results. See the --state switch for more information.

Remove composition

uniform canvas composition remove <id>
command
Delete a composition definition from the Uniform project.
+ show options

Update composition

uniform canvas composition update <filename>
command
Insert or update a composition definition from a local file to the Uniform project.
+ show options