1
0
Fork 0

chore(markdown): Linting of dev docs

This commit is contained in:
Joost De Cock 2022-02-19 08:04:25 +01:00
parent 1d8beedd44
commit 265ad404da
317 changed files with 1281 additions and 1503 deletions

View file

@ -1,11 +1,11 @@
---
---
title: complete
---
The `complete` setting controls the level of details that's included on your pattern.
This has different uses, such as generating patterns to be cut out with a laser cutter.
The default `complete` setting is `true`.
The default `complete` setting is `true`.
Set this to `false` to draft a base outline of the pattern, rather than a fully detailed pattern.
<Note>

View file

@ -1,4 +1,4 @@
---
---
title: embed
---
@ -9,7 +9,7 @@ The default for `embed` is `false` which will include the `width` and `height`
attributes in the SVG tag, thereby making it suitable for printing.
When set to `true` the `width` and `height` attributes will not be added
which allows you to inject the SVG into an HTML document, where it will
which allows you to inject the SVG into an HTML document, where it will
responsively scale.
```js
@ -25,4 +25,3 @@ const pattern = new Brian({
Do **not** use this for SVGs you want to print.
</Warning>

View file

@ -1,4 +1,4 @@
---
---
title: Settings
for: developers
about: Documents all the settings your pattern can receive, including the pattern options, measurmeents, and design options

View file

@ -1,4 +1,4 @@
---
---
title: idPrefix
---

View file

@ -1,23 +1,23 @@
---
---
title: layout
---
The `layout` setting allows you to control the way pattern parts are
The `layout` setting allows you to control the way pattern parts are
layed out on the pattern. There are 3 scenarios:
- layout is truthy: Do layout algorithmically
- layout is falsy: Do not do any layout apart from stacking all parts together
- layout is an object: Layout the parts as detailed in the layout object
- layout is truthy: Do layout algorithmically
- layout is falsy: Do not do any layout apart from stacking all parts together
- layout is an object: Layout the parts as detailed in the layout object
Let's look at each in detail:
## layout is truthy
This is the default behaviour. Parts will be laid without overlap in
a space that's a small as possible.
This is the default behaviour. Parts will be laid without overlap in
a space that's a small as possible.
Don't expect miracles here.
It's one of those things humans are far better at than
Don't expect miracles here.
It's one of those things humans are far better at than
computers.
## layout is falsy
@ -57,10 +57,10 @@ let pattern = new brian({
For each part in the `parts` attribute of our layout object, there are 4 possible attributes:
- move: Expects an object with an `x` and `y` property, and will move the part by `x` along the X-axis and by `y` along the Y-axis
- rotate: Expects a number, and will rotate the part by number degrees around its center point
- flipX: Will flip/mirror the part horizontally
- flipY: Will flip/mirror the part vertically
- move: Expects an object with an `x` and `y` property, and will move the part by `x` along the X-axis and by `y` along the Y-axis
- rotate: Expects a number, and will rotate the part by number degrees around its center point
- flipX: Will flip/mirror the part horizontally
- flipY: Will flip/mirror the part vertically
<Related>

View file

@ -1,4 +1,4 @@
---
---
title: locale
---

View file

@ -1,15 +1,15 @@
---
---
title: margin
---
The `margin` setting allows you to specify a part margin (in mm).
Each part will have this margin applied. The default is `2mm`.
The `margin` setting allows you to specify a part margin (in mm).
Each part will have this margin applied. The default is `2mm`.
This means that:
- At the edge of the SVG, the margin will be `margin * 1` (2mm by default)
- Between parts, the margin will be `margin * 2` (4mm by default)
- At the edge of the SVG, the margin will be `margin * 1` (2mm by default)
- Between parts, the margin will be `margin * 2` (4mm by default)
Note that setting the margin to zero (or below) will cause parts to overlap.
```js
@ -24,10 +24,10 @@ const pattern = new Brian({
###### For paperless, the minimal margin is 10mm
In paperless mode, the margin will not go below 10mm.
In paperless mode, the margin will not go below 10mm.
That is because text is not taken into account when calculating the bounding box of the part.
Since dimensions are typically the outermost elements in a paperless part,
Since dimensions are typically the outermost elements in a paperless part,
a too narrow margin would cause the dimension text to get cut off.
</Note>

View file

@ -1,9 +1,9 @@
---
---
title: measurements
---
The `measurements` settings should hold and object with the
measurements to draft the pattern for.
The `measurements` settings should hold and object with the
measurements to draft the pattern for.
The pattern configuration lists all required measurements.
```js
@ -16,4 +16,3 @@ const pattern = new Brian({
}
})
```

View file

@ -1,11 +1,11 @@
---
---
title: only
---
The `only` setting allows you to specify one or more parts to
The `only` setting allows you to specify one or more parts to
draft/render, rather than the entire pattern.
It accepts either a single part name as a string, or an array of
It accepts either a single part name as a string, or an array of
one or more part names.
```js

View file

@ -1,8 +1,8 @@
---
---
title: options
---
The `options` setting allows you to specify values for the pattern-specific
The `options` setting allows you to specify values for the pattern-specific
options that have been implemented by the pattern designer.
The available options are listed in the pattern configuration.
@ -22,4 +22,3 @@ const pattern = new Brian({
```
<Note>Unlike measurements, options come with defaults.</Note>

View file

@ -1,4 +1,4 @@
---
---
title: paperless
---
@ -15,4 +15,3 @@ const pattern = new Brian({
paperless: true
})
```

View file

@ -1,4 +1,4 @@
---
---
title: sa
---

View file

@ -7,7 +7,7 @@ title: scale
##### This setting is for future use
This setting has been added to our core library in anticipation
of a feature request that we've made part of [our v3
of a feature request that we've made part of [our v3
roadmap](https://github.com/freesewing/freesewing/discussions/1278).
It does not currently have any effect.
@ -18,10 +18,10 @@ The `scale` setting is an overal factor that will influence a variety of
factors to better support very large or very small patterns.
To be clear, `scale` does not change the size of the pattern itself.
It merely controls things like the various stroke width, the size of arrows
It merely controls things like the various stroke width, the size of arrows
on dimensions, the size of the text on the pattern, and so on.
This is a feature request by those users that our generating pattern
This is a feature request by those users that our generating pattern
for dolls. At such small sizes, many snippets, text, or logos become
so large (in comparison to the pattern) that they are problematic.
@ -34,4 +34,3 @@ const pattern = new Brian({
scale: 0.5
})
```

View file

@ -1,11 +1,11 @@
---
---
title: units
---
The `units` setting controls the units used on the pattern.
It can be either `metric` (the default) or `imperial`.
Note that this is only used to format the output.
Note that this is only used to format the output.
Freesewing expects mm as input.
```js