chore: More linting
@nicholasdower is smarter than me. What's missing was the `listItemIndent` setting
This commit is contained in:
parent
e6f1189017
commit
249f2600e5
293 changed files with 2170 additions and 2169 deletions
|
@ -6,9 +6,9 @@ order: 140
|
|||
You know what your bib should look like, and you have the _head_ measurement
|
||||
to work with. But there's still a number of choices you have to make:
|
||||
|
||||
- How large should the neck opening be?
|
||||
- How wide should the bib be?
|
||||
- How long should the bib be?
|
||||
- How large should the neck opening be?
|
||||
- How wide should the bib be?
|
||||
- How long should the bib be?
|
||||
|
||||
You can make all of these choices for the user and set them in stone, so to speak.
|
||||
|
||||
|
@ -33,10 +33,10 @@ Open the config file at `config/index.js` and add this to the options:
|
|||
|
||||
Can you guess what it means?
|
||||
|
||||
- We've added a option of type percentage
|
||||
- Its minimum value is 70%
|
||||
- Its maximum value is 90%
|
||||
- Its default value is 80%
|
||||
- We've added a option of type percentage
|
||||
- Its minimum value is 70%
|
||||
- Its maximum value is 90%
|
||||
- Its default value is 80%
|
||||
|
||||
<Note>
|
||||
|
||||
|
@ -55,9 +55,9 @@ options: {
|
|||
}
|
||||
```
|
||||
|
||||
- You've added `widthRatio` and `lengthRatio` options
|
||||
- You've given all options sensible defaults
|
||||
- You've given all options sensible maximum and minimum boundaries
|
||||
- You've added `widthRatio` and `lengthRatio` options
|
||||
- You've given all options sensible defaults
|
||||
- You've given all options sensible maximum and minimum boundaries
|
||||
|
||||
<Note>
|
||||
|
||||
|
|
|
@ -6,26 +6,26 @@ order: 280
|
|||
Congratulations, you have created your first pattern. And while it's arguably rather simple,
|
||||
you have learned a bunch of things along the way. Let's list some of the things you've learned:
|
||||
|
||||
- You learned how to [setup your development environment](/tutorials/pattern-design/create-freesewing-pattern) with `npx create-freesewing-pattern`
|
||||
- You learned how to [add parts](/tutorials/pattern-design/your-first-part), [measurements](/tutorials/pattern-design/adding-measurements), and [options](/tutorials/pattern-design/adding-options) to your pattern's configuration file
|
||||
- You learned what [a good boilerplate is to start with a new part](/tutorials/pattern-design/part-structure)
|
||||
- You learned [how to add points and draw paths](/tutorials/pattern-design/constructing-the-neck-opening)
|
||||
- You learned how you can make changes in a loop to [adapt the neck opening](/tutorials/pattern-design/fitting-the-neck-opening) or [rotate the straps](/tutorials/pattern-design/avoiding-overlap) until they were just right
|
||||
- You learned about [macros and how to use them](/tutorials/pattern-design/creating-the-closure)
|
||||
- You learned different methods to manipulate [points](/reference/api/point/) and [paths](/reference/api/path/)
|
||||
- You learned about using [attributes](/reference/api/attributes/) to influence the appearance of points and paths
|
||||
- You learned about what it means to draft [a complete pattern](/tutorials/pattern-design/completing-your-pattern)
|
||||
- You learned about [snippets and how to add them](/tutorials/pattern-design/completing-your-pattern#adding-snippets)
|
||||
- You learned [how to offset a path](/tutorials/pattern-design/completing-your-pattern#seam-allowance) to create seam allowance, or in our case, mark the bias tape line
|
||||
- You learned how to create a [paperless pattern](/tutorials/pattern-design/paperless-bib) by adding dimensions
|
||||
- You learned how to [setup your development environment](/tutorials/pattern-design/create-freesewing-pattern) with `npx create-freesewing-pattern`
|
||||
- You learned how to [add parts](/tutorials/pattern-design/your-first-part), [measurements](/tutorials/pattern-design/adding-measurements), and [options](/tutorials/pattern-design/adding-options) to your pattern's configuration file
|
||||
- You learned what [a good boilerplate is to start with a new part](/tutorials/pattern-design/part-structure)
|
||||
- You learned [how to add points and draw paths](/tutorials/pattern-design/constructing-the-neck-opening)
|
||||
- You learned how you can make changes in a loop to [adapt the neck opening](/tutorials/pattern-design/fitting-the-neck-opening) or [rotate the straps](/tutorials/pattern-design/avoiding-overlap) until they were just right
|
||||
- You learned about [macros and how to use them](/tutorials/pattern-design/creating-the-closure)
|
||||
- You learned different methods to manipulate [points](/reference/api/point/) and [paths](/reference/api/path/)
|
||||
- You learned about using [attributes](/reference/api/attributes/) to influence the appearance of points and paths
|
||||
- You learned about what it means to draft [a complete pattern](/tutorials/pattern-design/completing-your-pattern)
|
||||
- You learned about [snippets and how to add them](/tutorials/pattern-design/completing-your-pattern#adding-snippets)
|
||||
- You learned [how to offset a path](/tutorials/pattern-design/completing-your-pattern#seam-allowance) to create seam allowance, or in our case, mark the bias tape line
|
||||
- You learned how to create a [paperless pattern](/tutorials/pattern-design/paperless-bib) by adding dimensions
|
||||
|
||||
You can find the complete code of the tutorial pattern [here on GitHub](https://github.com/freesewing/freesewing/blob/develop/packages/tutorial/src/bib.js).
|
||||
|
||||
## More reading material
|
||||
|
||||
- If you haven't done so already, read through [the pattern guide](/guides/patterns/) which provides a good overview of how patterns work under the hood
|
||||
- Bookmark [the FreeSewing API docs](/reference/api/), they are your reference every time you're not entirely certain how something works
|
||||
- Have a look at [the design guide](/guides/best-practices/) for best practices that will help you make the best possible patterns
|
||||
- If you haven't done so already, read through [the pattern guide](/guides/patterns/) which provides a good overview of how patterns work under the hood
|
||||
- Bookmark [the FreeSewing API docs](/reference/api/), they are your reference every time you're not entirely certain how something works
|
||||
- Have a look at [the design guide](/guides/best-practices/) for best practices that will help you make the best possible patterns
|
||||
|
||||
## What to do next
|
||||
|
||||
|
|
|
@ -50,10 +50,10 @@ You've added some points to your part, and drawn your first path. Let's look at
|
|||
points.right = new Point(measurements.head / 10, 0)
|
||||
```
|
||||
|
||||
- We're adding a point named `right` to `points` which holds our part's points
|
||||
- We're using the Point constructor, which takes two arguments: The point's X and Y values
|
||||
- The X value is `measurements.head / 10`
|
||||
- The Y value is `0`
|
||||
- We're adding a point named `right` to `points` which holds our part's points
|
||||
- We're using the Point constructor, which takes two arguments: The point's X and Y values
|
||||
- The X value is `measurements.head / 10`
|
||||
- The Y value is `0`
|
||||
|
||||
The `bottom` part is very similar, so let's skip to the next line:
|
||||
|
||||
|
@ -62,12 +62,12 @@ points.rightCp1 = points.right
|
|||
.shift(90, points.bottom.dy(points.right)/2)
|
||||
```
|
||||
|
||||
- We're adding a point named `rightCp1`, which will become the _control point_ of the right part
|
||||
- Instead of using the Point constructor, we're calling the `Point.shift()` method on an existing point
|
||||
- It takes two arguments: The angle to shift towards, and the distance
|
||||
- You can see that we're shifting 90 degrees (that means up) but the distance uses another method
|
||||
- The `Point.dy()` method returns the delta along the Y axis between the point you call it on and the point you pass it
|
||||
- We shift half of the Y-delta
|
||||
- We're adding a point named `rightCp1`, which will become the _control point_ of the right part
|
||||
- Instead of using the Point constructor, we're calling the `Point.shift()` method on an existing point
|
||||
- It takes two arguments: The angle to shift towards, and the distance
|
||||
- You can see that we're shifting 90 degrees (that means up) but the distance uses another method
|
||||
- The `Point.dy()` method returns the delta along the Y axis between the point you call it on and the point you pass it
|
||||
- We shift half of the Y-delta
|
||||
|
||||
The next point is very similar again, except that this time we're shifting to the right (0 degrees) for half of
|
||||
the X-delta between points `bottom` and `right`.
|
||||
|
@ -87,10 +87,10 @@ paths.quarterNeck = new Path()
|
|||
.curve(points.rightCp1, points.bottomCp2, points.bottom)
|
||||
```
|
||||
|
||||
- We're adding a path named `quarterNeck` to `paths` which holds our part's paths
|
||||
- We're using the Path constructor, which takes no arguments
|
||||
- We're following up with a `Path.move()` call that takes one Point as argument
|
||||
- Then, there's a `Path.curve()` call that takes 3 points as arguments
|
||||
- We're adding a path named `quarterNeck` to `paths` which holds our part's paths
|
||||
- We're using the Path constructor, which takes no arguments
|
||||
- We're following up with a `Path.move()` call that takes one Point as argument
|
||||
- Then, there's a `Path.curve()` call that takes 3 points as arguments
|
||||
|
||||
If you've read through the high-level [Pattern guide](/guides/patterns/) you will have learned that paths
|
||||
always start with a `move()` operation. In this case, we moved to our `right` points.
|
||||
|
|
|
@ -19,14 +19,14 @@ npx create-freesewing-pattern
|
|||
|
||||
This will load a few dependencies, and then ask you the following questions:
|
||||
|
||||
- **Language**: Use the arrow keys to select the language of your choice
|
||||
- **Pattern name**: Enter `tutorial`
|
||||
- **description**: Enter `The FreeSewing tutorial`
|
||||
- **Pattern type**: Use the arrow key to select `Pattern`
|
||||
- **Department**: Use the arrow keys to select `Accessories`
|
||||
- **Author**: Enter your GitHub username
|
||||
- **GitHub repository**: This will be prefilled for you, so just hit Enter
|
||||
- **Package manager**: Use the arrow to choose. Pick `npm` if you're not sure.
|
||||
- **Language**: Use the arrow keys to select the language of your choice
|
||||
- **Pattern name**: Enter `tutorial`
|
||||
- **description**: Enter `The FreeSewing tutorial`
|
||||
- **Pattern type**: Use the arrow key to select `Pattern`
|
||||
- **Department**: Use the arrow keys to select `Accessories`
|
||||
- **Author**: Enter your GitHub username
|
||||
- **GitHub repository**: This will be prefilled for you, so just hit Enter
|
||||
- **Package manager**: Use the arrow to choose. Pick `npm` if you're not sure.
|
||||
|
||||
After you've answered these questions, the default template will be copied, after which all dependencies will be installed.
|
||||
|
||||
|
|
|
@ -28,9 +28,9 @@ do {
|
|||
|
||||
We've added a few new variables:
|
||||
|
||||
- `tweak`: A _tweak factor_ that we'll use to increase or decrease the neck opening by making it more or less than 1
|
||||
- `target`: How long our (quarter) neck opening should be
|
||||
- `delta`: How far we're off. Positive numbers mean it's too long, negative means too short
|
||||
- `tweak`: A _tweak factor_ that we'll use to increase or decrease the neck opening by making it more or less than 1
|
||||
- `target`: How long our (quarter) neck opening should be
|
||||
- `delta`: How far we're off. Positive numbers mean it's too long, negative means too short
|
||||
|
||||
Now that we know what `target` is, we construct our path as we did before.
|
||||
But this time around, we multiply our point coordinates with our `tweak` variable (1 at the start).
|
||||
|
|
|
@ -36,10 +36,10 @@ markings, depending on the units requested by the user.
|
|||
While the grid gets added automatically, the dimensions you have to add yourself.
|
||||
Thankfully, there's macros that can help you with that, specifically:
|
||||
|
||||
- The `hd` macro adds a horizontal dimension
|
||||
- The `vd` macro adds a vertical dimension
|
||||
- The `ld` macro adds a linear dimension
|
||||
- The `pd` macro adds a path dimension that follows a given path
|
||||
- The `hd` macro adds a horizontal dimension
|
||||
- The `vd` macro adds a vertical dimension
|
||||
- The `ld` macro adds a linear dimension
|
||||
- The `pd` macro adds a path dimension that follows a given path
|
||||
|
||||
<Note> The documentation, as always, holds [all the information about the macros](/reference/macros/). </Note>
|
||||
|
||||
|
@ -89,8 +89,8 @@ Your paperless bib
|
|||
|
||||
We used the `hd` macro to add two horizontal dimensions:
|
||||
|
||||
- One at the bottom for the width of our bib
|
||||
- One for the width of the neck opening
|
||||
- One at the bottom for the width of our bib
|
||||
- One for the width of the neck opening
|
||||
|
||||
The `hd` macro takes a `from` and `to` point as well as a `y` value that says at what Y-value to draw the dimension.
|
||||
|
||||
|
|
|
@ -65,19 +65,19 @@ and you use JavaScript's _object destructuring_ to only get what you need.
|
|||
|
||||
The example above makes the following variables available:
|
||||
|
||||
- `Point`: The Point constructor
|
||||
- `points`: A reference to the part's points
|
||||
- `Path`: The Path constructor
|
||||
- `paths`: A reference to the part's paths
|
||||
- `Point`: The Point constructor
|
||||
- `points`: A reference to the part's points
|
||||
- `Path`: The Path constructor
|
||||
- `paths`: A reference to the part's paths
|
||||
|
||||
These will make it possible for you to draw points and paths easily.
|
||||
|
||||
The following three variables are also needed to create a full-fledged FreeSewing pattern; their function and usage will
|
||||
be covered in detail [later on in this tutorial](/tutorials/pattern-design/completing-your-pattern/):
|
||||
|
||||
- `complete`: create a _complete_ pattern (or not)
|
||||
- `sa`: include _seam allowance_ (or not)
|
||||
- `paperless`: allow the pattern to be _paperless_
|
||||
- `complete`: create a _complete_ pattern (or not)
|
||||
- `sa`: include _seam allowance_ (or not)
|
||||
- `paperless`: allow the pattern to be _paperless_
|
||||
|
||||
For now, we only need these so that the pattern skeleton compiles properly.
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ If testing your pattern sounds like a lot of work, you're in luck. FreeSewing ca
|
|||
for you. Click the **Test your pattern** button in the top navigation bar of your
|
||||
development environment, and you'll see a number of choices on the right:
|
||||
|
||||
- Test pattern options
|
||||
- Test measurements
|
||||
- Test models
|
||||
- Test pattern options
|
||||
- Test measurements
|
||||
- Test models
|
||||
|
||||
The [API docs on sampling](/reference/api/pattern/#sample) have all the details on how this works, but
|
||||
for now we'll just look at the end result of each of these.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue