Workspaces, Packages, Resources
Workspace
Think of it like a workspace in Bazel or Buck2
A workspace is the root directory of a monorepo that contains the marker file .figtree.toml
and all its child directories. The .figtree.toml
file holds configuration that is shared across all packages within the workspace.
Package
Similar to a package in Bazel or Buck2
Just like in Bazel, a package is any subdirectory within the workspace that contains a .fig.toml
file, aka "fig-file". This file defines the package’s local configuration and the list of design resources to import. Intermediate directories between the workspace root and a .fig.toml
file are not considered packages.
Example project structure:
foo/
└── bar/
└── .fig.toml
.figtree.toml
In this example, there is a single package: //foo/bar
. The double slash //
refers to the root of the workspace.
Resource
A resource is anything you want to pull from Figma
A resource is an image or a set of images you want to import from Figma into your project. This could be an icon, logo, illustration, or any other visual asset. In the .fig.toml
file, you define which resources to download and how—for example, specifying the format (like PNG, SVG, etc.).