1
0
Fork 0

fix(docs): Howtos documentation corrections and updates

This commit is contained in:
Benjamin F 2022-12-22 17:24:59 -08:00
parent 04da277fd2
commit 24f7776840
25 changed files with 46 additions and 43 deletions

View file

@ -2,18 +2,19 @@
title: Accessing measurements
---
Measurements are available on the `measurements` key of from the object passed
[Measurements](/reference/measurements) are available on the `measurements` key of from the object passed
to your part's draft method. You can destructure them for easy access.
```design/src/part.mjs
function draftPart = ({
// highlight-start
measurements,
measurements,
// highlight-end
part
}) {
// Do something here
const a = measurements.chest
const b = measurements['hips']
return part
}

View file

@ -2,18 +2,19 @@
title: Accessing options
---
(the value of) Options are available on the `options` key of from the object
Options are available on the `options` key of from the object
passed to your part's draft method. You can destructure them for easy access.
```design/src/part.mjs
function draftPart = ({
function draftPart = ({
// highlight-start
options,
options,
// highlight-end
part
part
}) {
// Do something here
const a = options.fitKnee
const b = options[waistEase]
return part
}

View file

@ -3,7 +3,7 @@ title: Adding paths
---
Paths should be stored in the `paths` key of the object passed to your part's
draft method. The contructor for paths is available in the `Path` key. You can
draft method. The constructor for paths is available in the `Path` key. You can
destructure them for easy access.
<Example caption="An example of adding a path" tutorial>

View file

@ -3,7 +3,7 @@ title: Adding points
---
Points should be stored in the `points` key of the object passed to your part's
draft method. The contructor for points is available in the `Point` key. You
draft method. The constructor for points is available in the `Point` key. You
can destructure them for easy access.
<Example caption="An example of adding a point" tutorial>

View file

@ -3,7 +3,7 @@ title: Adding snippets
---
Snippets should be stored in the `snippets` key of the object passed to your part's
draft method. The contructor for snippets is available in the `Snippets` key. You can
draft method. The constructor for snippets is available in the `Snippets` key. You can
destructure them for easy access.
<Example caption="An example of adding a snippet" tutorial>

View file

@ -37,4 +37,3 @@ function draftPart = ({
}
```
</Example>
```

View file

@ -7,7 +7,9 @@ make sure to draft all of a part's dependencies before drafting the part
itself.
<Warning compact>
Do not confuse this with [part inheritance](/howtos/code/from).
Even though inherited parts are automatically included in a part's dependencies,
do not confuse part dependencies with [part inheritance](/howtos/code/from).
</Warning>
Part dependencies are configured with [the `after`

View file

@ -3,10 +3,10 @@ title: Creating a new pattern design
---
When creating a new design, you have two options. You can create it in a
stand-along development environment. Or you can create it inside (your fork of)
stand-alone development environment. Or, you can create it inside (your fork of)
the FreeSewing monorepo.
If you are unsure what to pick, go with the standalong development environment.
If you are unsure what to pick, go with the stand-alone development environment.
It is the best choice for people new to FreeSewing.
Working inside the monorepo is the preferred way of regular contributors, but
@ -15,7 +15,7 @@ when in doubt, go stand-alone. You can always change track later.
## Stand-alone
To setup the standalong development environment, you need NodeJS 16 or higher.
To setup the stand-alone development environment, you need NodeJS 16 or higher.
Then run:
```sh
@ -37,4 +37,4 @@ yarn new design
These commands will clone your fork of the
[freesewing/freesewing](https://github.com/freesewing/freesewing) repository on
Github and set it up for development.
GitHub and set it up for development.

View file

@ -22,7 +22,7 @@ Do __not__ replace the `path` object:
paths = {}
```
as the `paths` object is more than a pojo (plain old javascript object)
as the `paths` object is more than a pojo (plain old JavaScript object)
</Warning>
<Tip>

View file

@ -11,7 +11,7 @@ show you have to handle both below:
## Adding linebreaks to text
To add linebreaks to text, you merely have to include them in your text.
When doing so, keep in mind that single-quoted strings in Javascript
When doing so, keep in mind that single-quoted strings in JavaScript
will **not** pick up linebreaks.
<Example caption="An example of whitespace in text">