1
0
Fork 0
freesewing/markdown/dev/reference/api/config/dependencies/en.md
Joost De Cock 249f2600e5 chore: More linting
@nicholasdower is smarter than me. What's missing was the
`listItemIndent` setting
2022-02-20 14:44:38 +01:00

1.2 KiB

title
dependencies

The dependencies key in the pattern configuration file allow you to configure dependencies between different parts of your pattern. For example, you may only be able to draft the sleeve after having drafted the part that contains the armhole the sleeve should fit in.

Dependencies control the order in which parts get drafted, but are also used when users requests to only draft some parts of a pattern. Behind the scenes, FreeSewing will draft all dependencies, and make sure to not render them if they were not requested.

Structure

A plain object of key-value pairs that controls the order in which pattern parts will get drafted. The value can either be a string, or an array of strings. Those strings should be part names.

You read the configuration as: key depends on value.

Example

dependencies: {
  front: "back",
  sleeveplacket: ["sleeve", "cuff"]
}

In this example:

  • The front part depends on the back part
  • The sleeveplacket part depends on the sleeve and cuff parts.

See Part dependencies for more in-depth information on dependencies.