wip(markdown): Work on updating tutorial
This commit is contained in:
parent
b9a46e9763
commit
8e7595fcb4
8 changed files with 318 additions and 221 deletions
|
@ -8,28 +8,36 @@ we are going to draft our pattern according to the measurements provided to us.
|
|||
|
||||
Which begs the question, which measurements?
|
||||
|
||||
It is you, as the pattern designer, who decides which measurements are required to draft your pattern.
|
||||
For our bib, the only measurement we need is the baby's _head circumference_.
|
||||
It is you, as the pattern designer, who decides which measurements are used
|
||||
to draft your pattern. For our bib, the only measurement we need is the
|
||||
_head circumference_.
|
||||
|
||||
So let's add it as a required measurement.
|
||||
|
||||
## Add required measurements
|
||||
## Adding required measurements
|
||||
|
||||
Open the config file at `design/config.js` and update the `measurements` array with the name of our required measurement:
|
||||
In our `bib.mjs` file, on the `bib` object, we'll add a new key called
|
||||
`measurements` that will hold a list (an array) of all required measurements
|
||||
for this part.
|
||||
|
||||
```js
|
||||
measurements: ["head"],
|
||||
We are going to use *the official name* of the measurement. For head
|
||||
circumference, that name is `head`.
|
||||
|
||||
```design/src/bib.mjs
|
||||
function draftBib({ part }) {
|
||||
|
||||
return part
|
||||
}
|
||||
|
||||
export const bib = {
|
||||
name: 'tutorial.bib',
|
||||
draft: draftBib,
|
||||
// Add this line:
|
||||
measurements: ['head'],
|
||||
}
|
||||
```
|
||||
|
||||
<Tip>
|
||||
|
||||
Make sure to re-use the names of existing measurements, rather than invent your own.
|
||||
|
||||
See our [best practices](/guides/best-practices/reuse-measurements) on this topic for details.
|
||||
|
||||
</Tip>
|
||||
|
||||
Now everybody knows your pattern requires the `head` measurement.
|
||||
Now everybody knows this part requires the `head` measurement.
|
||||
|
||||
This change will also get picked up by the development environment, and you'll now see this screen:
|
||||
|
||||
|
@ -41,4 +49,22 @@ For example `38` as 38cm is a realistic head circumference measurement for a bab
|
|||
Enter `38` in the box, and click on **Draft Design** in the sidebar under the **View** heading.
|
||||
This brings you back to our work in progress:
|
||||
|
||||
<Example pattern="tutorial" part="step1">Nothing has changed, yet</Example>
|
||||
|
||||
## Notes
|
||||
|
||||
### Why using standard measurements names matters
|
||||
|
||||
In principle, you can use any name you want for your measurements.
|
||||
Our core library really doesn't care.
|
||||
|
||||
However, if everybody uses their own (names for) measurements, then people
|
||||
aren't able to re-use their measurements across designs.
|
||||
|
||||
So if you have any intention at all to play nice with the FreeSewing ecosystem,
|
||||
please make sure to re-use the names of existing measurements, rather than
|
||||
invent your own.
|
||||
|
||||
See our [best practices](/guides/best-practices/reuse-measurements) on this
|
||||
topic for details.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue