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

@ -6,10 +6,9 @@ about: Shows you how to access user measurements from inside your pattern
Measurements are stored in `pattern.settings.measurements`.
You can pull them out of there with
You can pull them out of there with
the [shorthand](/howtos/code/shorthand/) call:
```js
const { measurements, options } = part.shorthand()

View file

@ -6,13 +6,11 @@ about: Shows you how to access user options from inside your pattern
Options are stored in `pattern.settings.options`.
You can pull them out of there with
You can pull them out of there with
the [shorthand](/howtos/code/shorthand/) call:
```js
const { measurements, options } = part.shorthand()
let sleeveBonus = measurements.shoulderToWrist * (1 + options.sleeveLengthBonus);
```

View file

@ -8,11 +8,11 @@ about: While documentation is good, sometimes you want to add some instructions
##### See this example in our source code
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/38d101b0415a4cbf3f9f86e006bd8cb7c43c703b/packages/jaeger/src/front.js#L411)
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/38d101b0415a4cbf3f9f86e006bd8cb7c43c703b/packages/jaeger/src/front.js#L411)
</Note>
Adding instructions to your pattern is _just_ a matter of adding text.
Adding instructions to your pattern is *just* a matter of adding text.
The tricky part is to make sure your text can be translated.
Below is a rather involved example from Aaron:

View file

@ -4,7 +4,7 @@ for: developers
about: Shows you how to add new parts to your pattern
---
Since the patterns parts are listed
Since the patterns parts are listed
in [the configuration file](/reference/config/), freesewing knows about
all the parts that belong to your pattern.

View file

@ -5,7 +5,7 @@ icon: pattern
about: Shows you how to add paths to your pattern
---
After using the [shorthand](/howtos/code/shorthand/) call,
After using the [shorthand](/howtos/code/shorthand/) call,
`Path` contains the path constructor, while `paths` is a reference to `part.paths`,
which is where you should store your paths.

View file

@ -4,7 +4,7 @@ for: developers
about: Shows you how to add points to your pattern
---
After using the [shorthand](/howtos/code/shorthand/) call,
After using the [shorthand](/howtos/code/shorthand/) call,
`Point` contains the point constructor, while `points` is a reference to `part.points`,
which is where you should store your points.

View file

@ -4,7 +4,7 @@ for: developers
about: Shows you how to add snippets to your pattern
---
After using the [shorthand](/howtos/code/shorthand/) call,
After using the [shorthand](/howtos/code/shorthand/) call,
`Snippet` contains the path constructor, while `snippets` is a reference to `part.snippets`,
which is where you should store your paths.
@ -16,8 +16,8 @@ snippets.logo = new Snippet('logo', points.logoAnchor);
You can scale and rotate a snippet by setting the `data-scale` and `data-rotate` attributes respectively.
- **data-scale** : Either a single scale factor, or a set of 2 scale factors for the X and Y axis respectively. See [the SVG scale transform](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform#Scale) for details.
- **data-rotate**: A rotation in degrees. The center of the rotation will be the snippet's anchor point
- **data-scale** : Either a single scale factor, or a set of 2 scale factors for the X and Y axis respectively. See [the SVG scale transform](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform#Scale) for details.
- **data-rotate**: A rotation in degrees. The center of the rotation will be the snippet's anchor point
<Tip>
@ -30,4 +30,3 @@ Below is an example of the available snippets, and the use of the `data-scale` a
<Example pattern="rendertest" options_only="snippets">
Overview of available snippets
</Example>

View file

@ -4,8 +4,8 @@ title: Adding text
SVG is pretty great, but its text handling leaves much to be desired.
To abstract away the intricacies of adding text to an SVG document,
FreeSewing lets you add text to patterns by adding it to the attributes
To abstract away the intricacies of adding text to an SVG document,
FreeSewing lets you add text to patterns by adding it to the attributes
of points and paths.
All you have to do is set the `data-text` attribute to the text you want to add to the pattern:
@ -48,4 +48,3 @@ paths.example = new Path()
<Example part="path_attr">
Text on a path
</Example>

View file

@ -14,7 +14,7 @@ paths.example.attributes.add('class', 'lining dashed');
```
Because it's so common to set attributes, Points, Paths and Snippets all have
the `attr()` helper method.
the `attr()` helper method.
Not only is less more, the method is also *chainable*, which allows you to do this:
@ -33,7 +33,7 @@ The [adding-text](/concepts/adding-text) documentation explains this in detail.
<Tip>
When rendering, FreeSewing will output all your attributes. This gives you the
When rendering, FreeSewing will output all your attributes. This gives you the
possiblity to use any valid attribute to control the appearance.
This is also why we use the *data-* prefix for those attributes that have

View file

@ -5,7 +5,7 @@ about: Shows you how to create a new design
---
To create a new pattern, call `new freesewing.Design()`.
It takes your pattern configuration,
It takes your pattern configuration,
and any plugins you want to load as parameters.
For example, if we were creating a new pattern called `Sorcha`:
@ -19,7 +19,7 @@ import config from "../config"
const Sorcha = new freesewing.Design(config, plugins)
```
This method does not return a `Design` object. Instead it returns
This method does not return a `Design` object. Instead it returns
a constructor method for your pattern.
When importing your pattern, it is itself a constructor:
@ -35,7 +35,7 @@ let pattern = new Sorcha()
##### Design() is a super-constructor
Constructors are functions you can call with `new` to create an object.
Constructors are functions you can call with `new` to create an object.
As `freesewing.Design()` returns a constructor, you can think of it
as a super-constructor.

View file

@ -18,7 +18,7 @@ dependencies: {
}
```
This could be from a T-shirt pattern where the `front` and `back` patterns are very similar,
This could be from a T-shirt pattern where the `front` and `back` patterns are very similar,
so they both are inheriting a `base` part.
In addition, the `sleeve` part needs to be drafted after the `front` and `back` part because
in `front` and `back` we store the length of the armhole seam in the [store](/reference/api/store) and
@ -26,9 +26,9 @@ we need that info to fit the sleevecap to the armhole.
Now if a user requests to draft only the `sleeve` part, FreeSewing will still draft:
- First the `base` part
- Then the `front` and `back` parts
- Finally the `sleeve` part
- First the `base` part
- Then the `front` and `back` parts
- Finally the `sleeve` part
but it will only render the `sleeve` part, as that's the only thing the user requested.

View file

@ -4,10 +4,10 @@ for: developers
about: Shows how you can add circles to your pattern
---
Real circles are rarely used in pattern design, and they are not part of the SVG path specification,
Real circles are rarely used in pattern design, and they are not part of the SVG path specification,
but rather a different SVG element.
Still, if you want a circle, you can draw one by setting a Point's `data-circle` attribute
Still, if you want a circle, you can draw one by setting a Point's `data-circle` attribute
to the radius of the circle you want to draw.
In addition, all attributes that have a `data-circle-` prefix will apply to the circle, rather than the point.
@ -15,4 +15,3 @@ In addition, all attributes that have a `data-circle-` prefix will apply to the
<Example pattern="rendertest" options_only="circles">
Circles
</Example>

View file

@ -8,49 +8,52 @@ about: Shows how to create a variation of a pre-existing design
##### See this example in our source code
- [packages/aaron/config/index.js](https://github.com/freesewing/freesewing/blob/72f34101792bda4d8e553c3479daa63cb461f3c5/packages/aaron/config/index.js#L34)
- [packages/aaron/src/index.js](https://github.com/freesewing/freesewing/blob/72f34101792bda4d8e553c3479daa63cb461f3c5/packages/aaron/src/index.js#L2)
- [packages/carlita/src/index.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/carlita/src/index.js#L25)
- [packages/aaron/config/index.js](https://github.com/freesewing/freesewing/blob/72f34101792bda4d8e553c3479daa63cb461f3c5/packages/aaron/config/index.js#L34)
- [packages/aaron/src/index.js](https://github.com/freesewing/freesewing/blob/72f34101792bda4d8e553c3479daa63cb461f3c5/packages/aaron/src/index.js#L2)
- [packages/carlita/src/index.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/carlita/src/index.js#L25)
</Note>
## Setup
To be able to extend existing patterns, you will have to access them on your local machine. There are two ways to do this:
- add needed dependencies when using `npx create-freesewing-pattern`
- create your new pattern in a clone of the [freesewing monorepo](https://github.com/freesewing/freesewing)
- add needed dependencies when using `npx create-freesewing-pattern`
- create your new pattern in a clone of the [freesewing monorepo](https://github.com/freesewing/freesewing)
### When using `npx create-freesewing-pattern`
If you want to use existing patterns when creating your new pattern with `npx create-freesewing-pattern`, you have to install the needed dependencies.
Let's say you want to extend Brian.
In your freshly created pattern folder, you now have to run
If you want to use existing patterns when creating your new pattern with `npx create-freesewing-pattern`, you have to install the needed dependencies.\
Let's say you want to extend Brian.\
In your freshly created pattern folder, you now have to run
```bash
npm install --save @freesewing/brian
```
This will install Brian as a dependency, which you can then access in your pattern (see [examples](/howtos/code/extend-pattern/#examples) below on how to do that).
This will install Brian as a dependency, which you can then access in your pattern (see [examples](/howtos/code/extend-pattern/#examples) below on how to do that).\
This has to be repeated for every new pattern you create.
<Tip>
Some packages need more than one dependency. Carlton, for example, is based on Bent, which in turn is based on Brian. You will have to install all dependencies in the way shown above. If something is still missing, error messages will tell you what you still need to install.
Some packages need more than one dependency. Carlton, for example, is based on Bent, which in turn is based on Brian. You will have to install all dependencies in the way shown above. If something is still missing, error messages will tell you what you still need to install.
</Tip>
### Using the freesewing monorepo
You can use the power of robots to install the needed dependencies if you work in a clone of the [freesewing monorepo](https://github.com/freesewing/freesewing).
- First, clone the monorepo (or your fork of it) to your local machine.
- Go to the root and run `yarn kickstart`. This will take a while, so grab a coffee and come back later.
- Once that is done, edit the file `config/descriptions.yaml` to include the name and description of your new pattern (take care to start the description with `A FreeSewing pattern`).
- Create a folder for your new pattern in `packages`.
- Run `yarn reconfigure`. This will read the changes in `config/descriptions.yaml` and create the needed files in your new folder.
- If you haven't already, now is also a good time to create a feature branch so that you don't work directly in the `develop`-branch of the git-repository: `git checkout -b mycoolnewpattern` (adjust name accordingly).
- You can now start the actual pattern design work (i.e. editing and adding `src` and `config` files for your pattern.
- For dependencies, configure them in `config/dependencies.yaml`.
- Run `yarn reconfigure` again, and the magic will make sure that your `package.json` is updated accordingly.
- You can set yourself as an author in `config/exceptions.yaml`, and - you guessed it - run `yarn reconfigure` again.
You can use the power of robots to install the needed dependencies if you work in a clone of the [freesewing monorepo](https://github.com/freesewing/freesewing).
- First, clone the monorepo (or your fork of it) to your local machine.
- Go to the root and run `yarn kickstart`. This will take a while, so grab a coffee and come back later.
- Once that is done, edit the file `config/descriptions.yaml` to include the name and description of your new pattern (take care to start the description with `A FreeSewing pattern`).
- Create a folder for your new pattern in `packages`.
- Run `yarn reconfigure`. This will read the changes in `config/descriptions.yaml` and create the needed files in your new folder.
- If you haven't already, now is also a good time to create a feature branch so that you don't work directly in the `develop`-branch of the git-repository: `git checkout -b mycoolnewpattern` (adjust name accordingly).
- You can now start the actual pattern design work (i.e. editing and adding `src` and `config` files for your pattern.
- For dependencies, configure them in `config/dependencies.yaml`.
- Run `yarn reconfigure` again, and the magic will make sure that your `package.json` is updated accordingly.
- You can set yourself as an author in `config/exceptions.yaml`, and - you guessed it - run `yarn reconfigure` again.
Now you can work on extending existing patterns into something new and exciting. And the best part about using this method is that making a pull request will be much easier once you're done developing your new pattern.

View file

@ -8,7 +8,7 @@ about: When you inherit a part, it comes with a bunch of paths. Here'show to hid
##### See this example in our source code
- [packages/aaron/src/front.js](https://github.com/freesewing/freesewing/blob/develop/packages/aaron/src/front.js#L22)
- [packages/aaron/src/front.js](https://github.com/freesewing/freesewing/blob/develop/packages/aaron/src/front.js#L22)
</Note>

View file

@ -7,7 +7,7 @@ about: Shows how you can use one design as the basis for another
If your pattern is based on, or extending, another pattern (some of) your
pattern parts will need to be drafted by the parent pattern.
In such a case, rather than return our own draft method for the part, you
In such a case, rather than return our own draft method for the part, you
should instantiate the parent pattern, and return its part draft method:
```js

View file

@ -15,16 +15,16 @@ inject: {
}
```
The `front` and `back` parts will be *injected* with the `base` part. As a result, both
the `front` and `back` parts will be instantiated with a cloned copy of all the points, paths,
The `front` and `back` parts will be *injected* with the `base` part. As a result, both
the `front` and `back` parts will be instantiated with a cloned copy of all the points, paths,
and snippets of the `base` part.
This is a common design pattern where one part builds on another. In our example, we can imagine
a T-shirt pattern where the front and back are rather similar, apart from the neckline.
So rather than repeating ourselves, we draft a `base` part and inject that in the `front` and
So rather than repeating ourselves, we draft a `base` part and inject that in the `front` and
`back` parts.
Using `inject` will cause FreeSewing to always draft the injected part prior to
Using `inject` will cause FreeSewing to always draft the injected part prior to
drafting the part it gets injected to. It will, in other words, influece the draft order.
<Note>

View file

@ -8,11 +8,10 @@ about: When you inherit a part, it comes with a bunch of paths. Here'show to rem
##### See this example in our source code
- [packages/carlton/src/back.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/carlton/src/back.js#L62)
- [packages/carlton/src/back.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/carlton/src/back.js#L62)
</Note>
```js
for (let i in paths) delete paths[i]
```

View file

@ -8,17 +8,16 @@ about: Shows how to share dimensions between similar pattern parts
##### See this example in our source code
- [packages/aaron/src/shared.js](https://github.com/freesewing/freesewing/blob/develop/packages/aaron/src/shared.js)
- [packages/aaron/src/front.js](https://github.com/freesewing/freesewing/blob/72f34101792bda4d8e553c3479daa63cb461f3c5/packages/aaron/src/front.js#L160)
- [packages/aaron/src/shared.js](https://github.com/freesewing/freesewing/blob/develop/packages/aaron/src/shared.js)
- [packages/aaron/src/front.js](https://github.com/freesewing/freesewing/blob/72f34101792bda4d8e553c3479daa63cb461f3c5/packages/aaron/src/front.js#L160)
</Note>
When you have different pattern parts that look similar -- like the front
and back of a garment -- you may find that there's a lot of dimensions
and back of a garment -- you may find that there's a lot of dimensions
shared between them.
The example below is from Aaron where dimensions are shared between
The example below is from Aaron where dimensions are shared between
the back and front part.
Aaron has a file called `shared.js` that looks like this:
@ -49,8 +48,7 @@ import { dimensions } from './shared'
<Note>
Since our shared dimension method is a so-called _named export_ we need to
Since our shared dimension method is a so-called *named export* we need to
import it with the syntax you see above.
</Note>

View file

@ -9,7 +9,7 @@ The [Part.shorthand()](/reference/api/part/#shorthand) method will become your b
By using [object destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Object_destructuring) you'll get access to a bunch
of handy variables to make your code more concise and readable.
[Part.shorthand()](/reference/api/part/#shorthand) provides a lot of things, and you typically
[Part.shorthand()](/reference/api/part/#shorthand) provides a lot of things, and you typically
don't need all of them, but here's everything it has to offer:
```js

View file

@ -8,7 +8,7 @@ Sometimes, you'll want to access data from one part into another part.
For example, you may store the length of the armhole in your front and back parts,
and then read that value when drafting the sleeve so you can verify the sleeve fits the armhole.
For this, you should use the [Store](/reference/api/store/), which is available via
For this, you should use the [Store](/reference/api/store/), which is available via
the [shorthand](/howtos/code/shorthand/) call:
```js

View file

@ -8,11 +8,11 @@ about: Shows how to store a seam length so you can true the seam of another part
##### See this example in our source code
- [packages/aaron/src/front.js](https://github.com/freesewing/freesewing/blob/develop/packages/aaron/src/front.js#L103)
- [packages/aaron/src/front.js](https://github.com/freesewing/freesewing/blob/develop/packages/aaron/src/front.js#L103)
</Note>
Often when designing patterns, we need to _true a seam_ which means to make sure
Often when designing patterns, we need to *true a seam* which means to make sure
that two parts that need to be joined together are the same distance.
The example below is from Aaron and stores the length of the armhole seam:
@ -27,4 +27,3 @@ The example below is from Aaron and stores the length of the armhole seam:
.length()
)
```

View file

@ -52,5 +52,3 @@ points.example.attr(
Whether you're rendering to SVG or React, by using `&#160;` your spaces
will be properly rendered in both environments.

View file

@ -8,12 +8,12 @@ about: Shows how to adapt the length of the sleevecap to fit your armhole
##### See this example in our source code
- [packages/bent/src/sleeve.js](https://github.com/freesewing/freesewing/blob/develop/packages/bent/src/sleeve.js)
- [packages/bent/src/sleeve.js](https://github.com/freesewing/freesewing/blob/develop/packages/bent/src/sleeve.js)
</Note>
Fitting the sleevecap to the armhole means that we need to make sure the length
of the seams match.
of the seams match.\
A similar challenge is to fit the collar to the neck opening and so on.
For all of these situations where you have to create curved seams with matching
@ -25,15 +25,15 @@ This pattern is rather common, and we will unpack an example from Bent below.
Before we dive in, here's a few things to keep in mind:
- In Javascript, you can create a function within your function and call it
- Bent extends Brian which sets both the `frontArmholeLength` and `backArmholeLength` values in the store with the length of those seams
- We need to match the length of the sleevecap + sleeve cap ease to the length of the front and back armhole
- In Javascript, you can create a function within your function and call it
- Bent extends Brian which sets both the `frontArmholeLength` and `backArmholeLength` values in the store with the length of those seams
- We need to match the length of the sleevecap + sleeve cap ease to the length of the front and back armhole
Here's how you can handle this in code:
- We create a method that does teh actual drafting of our sleevecap
- We use a `tweak` value to influence the process, we start with a value of `1`
- We check the length after every attempt, and adjust the `tweak` value
- We create a method that does teh actual drafting of our sleevecap
- We use a `tweak` value to influence the process, we start with a value of `1`
- We check the length after every attempt, and adjust the `tweak` value
```js
export default function (part) {
@ -81,7 +81,7 @@ export default function (part) {
A few things that are important:
- We check to see how close we are by using `Math.abs(delta)` which gives us the absolute value of our delta
- We guard against an endless loop by keeping track of the runs and giving up after 25
- We multiply by `0.99` and `1.02` to respectively decrease and increase our `tweak` factor.
This assymetric approach avoids that we end up ping-ponging around our target value and never land somewhere in the middle
- We check to see how close we are by using `Math.abs(delta)` which gives us the absolute value of our delta
- We guard against an endless loop by keeping track of the runs and giving up after 25
- We multiply by `0.99` and `1.02` to respectively decrease and increase our `tweak` factor.
This assymetric approach avoids that we end up ping-ponging around our target value and never land somewhere in the middle

View file

@ -8,7 +8,7 @@ about: Adding seam allowance or hem allowance is easy to do
##### See this example in our source code
- [packages/bruce/src/inset.js](https://github.com/freesewing/freesewing/blob/develop/packages/bruce/src/inset.js#L34)
- [packages/bruce/src/inset.js](https://github.com/freesewing/freesewing/blob/develop/packages/bruce/src/inset.js#L34)
</Note>
@ -20,8 +20,8 @@ seam allowance.
In the example below we have two such paths:
- `paths.saBase` is the path that will require regular seam allowance
- `paths.hemBase` is the path that will require more seam allowance, or hem allowance
- `paths.saBase` is the path that will require regular seam allowance
- `paths.hemBase` is the path that will require more seam allowance, or hem allowance
When creating them, we disable rendering, effectively hiding them.
Then we string together our real path and our seam allowance based on them:

View file

@ -8,18 +8,18 @@ about: Slash and spread is easy enough on paper, here's how to do it in code
##### See this example in our source code
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/jaeger/src/front.js#L64)
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/jaeger/src/front.js#L64)
</Note>
When we _slash and spread_ a pattern, we cut out a triangle, and then rotate it
When we *slash and spread* a pattern, we cut out a triangle, and then rotate it
around the tip of the triangle.
And that's exactly what we do in code. We just need to know:
- What point we want to rotate around
- Which points we want to rotate
- By how much we want to rotate
- What point we want to rotate around
- Which points we want to rotate
- By how much we want to rotate
```js
let rotate = [

View file

@ -8,7 +8,7 @@ about: Adding multiple snippets doesn't need to be a chore with this handy macro
##### See this example in our source code
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/jaeger/src/front.js#L381)
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/jaeger/src/front.js#L381)
</Note>

View file

@ -7,4 +7,3 @@ the hardest part. These guides will walk you through setting up your
development environment on your operating system of choice.
<ReadMore />

View file

@ -4,7 +4,7 @@ for: developers
about: Shows you how to setup your development environment to work on freesewing.dev, our website for developers
---
freesewing.dev is built from a package in our monorepo. You will need the following setup and installed before you begin: Node, [lerna](https://lerna.js.org/) and [yarn](https://yarnpkg.com/).
freesewing.dev is built from a package in our monorepo. You will need the following setup and installed before you begin: Node, [lerna](https://lerna.js.org/) and [yarn](https://yarnpkg.com/).
To get started, checkout the repository:

View file

@ -21,20 +21,20 @@ Enter the newly installed repository:
cd freesewing.org
```
Copy the `.env.example` file to `.env`. If you just want to get the site running you don't need to edit the values inside the `.env` file. But if you want to use any of the integrations (e.g. Google Authentication, Algolia search) you will need to enter your own values to this file.
Copy the `.env.example` file to `.env`. If you just want to get the site running you don't need to edit the values inside the `.env` file. But if you want to use any of the integrations (e.g. Google Authentication, Algolia search) you will need to enter your own values to this file.
```bash
cp .env.example .env
```
Because freesewing.org is in the process of moving to the monorepo, it's using shared components from the monorepo as a submodule. You will need to initialize the monorepo submodule. Do so with the following git commands:
Because freesewing.org is in the process of moving to the monorepo, it's using shared components from the monorepo as a submodule. You will need to initialize the monorepo submodule. Do so with the following git commands:
```bash
git submodule init
git submodule update
```
Before running the above command the `monorepo` folder will be empty. After running the above commands you should see files in the `monorepo` folder.
Before running the above command the `monorepo` folder will be empty. After running the above commands you should see files in the `monorepo` folder.
Now install the dependencies:

View file

@ -8,4 +8,3 @@ Blog posts have been migrated to [Strapi](https://strapi.io/), a headless CMS sy
Our strapi instance can be accessed at [posts.freesewing.org](https://posts.freesewing.org/).
If you don't have a Strapi account (yet), [reach out to us on Discord](https://discord.freesewing.org).

View file

@ -13,4 +13,3 @@ categories:
- anothercat
- somethingelse
```

View file

@ -3,7 +3,7 @@ title: Mult-line text
order: 40
---
To add multi-line text in frontmatter, use a `|` character,
To add multi-line text in frontmatter, use a `|` character,
and prefix the lines by spaces:
```md
@ -11,6 +11,3 @@ about: |
This is a multi-line text
that will be assigned to the about key
```

View file

@ -3,8 +3,7 @@ title: Howtos
order: zcc
---
You can find a list of all FreeSewing hotwtos below:
You can find a list of all FreeSewing hotwtos below:
<ReadMore recurse />
@ -20,4 +19,3 @@ guides take more time to explain in-depth what is being done and why.
For more details, refer to [How we structure our documentation](/guides/docs).
</Related>

View file

@ -2,8 +2,8 @@
title: FreeSewing in the browser
---
Thanks to the advances in browser standardisation around Javascrip
ESM modules, not to mention [the new Skypack CDN](https://www.skypack.dev/),
Thanks to the advances in browser standardisation around Javascrip
ESM modules, not to mention [the new Skypack CDN](https://www.skypack.dev/),
you can generate patterns in the browser with a few lines of Javascript.
<Tip>
@ -21,19 +21,18 @@ our website for makers.
To generate a pattern, you will need to:
- Instantiate the pattern (`new ...`)
- Pass it the settings and measurements you want to use (`{ ... }`)
- Load the theme plugin (using `use()`)
- Draft the pattern (using `draft()`)
- Render it to SVG (using `render()`)
- Instantiate the pattern (`new ...`)
- Pass it the settings and measurements you want to use (`{ ... }`)
- Load the theme plugin (using `use()`)
- Draft the pattern (using `draft()`)
- Render it to SVG (using `render()`)
Which can be done as a one-liner since `use()`, `draft()` and
`render()` are all chainable, as shown below.
## Code example
Below is a complete example.
Below is a complete example.
```html
<html>
@ -87,9 +86,7 @@ Below is a complete example.
## Dependencies
If you compare this example with [our NodeJS
If you compare this example with [our NodeJS
example](/reference/howtos/nodejs) you'll notice that you do not
need to worry about loading any dependencies. Not even `@freesewing/core`
is loaded, because Skypack will pull in all dependencies for you.

View file

@ -3,4 +3,3 @@ title: FreeSewing in different environments
---
You can use FreeSewing a different environments:

View file

@ -22,11 +22,11 @@ our website for makers.
To generate a pattern, you will need to:
- Instantiate the pattern (`new ...`)
- Pass it the settings and measurements you want to use (`{ ... }`)
- Load the theme plugin (using `use()`)
- Draft the pattern (using `draft()`)
- Render it to SVG (using `render()`)
- Instantiate the pattern (`new ...`)
- Pass it the settings and measurements you want to use (`{ ... }`)
- Load the theme plugin (using `use()`)
- Draft the pattern (using `draft()`)
- Render it to SVG (using `render()`)
Which can be done as a one-liner since `use()`, `draft()` and
`render()` are all chainable, as shown below.
@ -64,11 +64,11 @@ console.log(svg)
##### Remarks on the example code
- We are using `@freesewing/aaron` as the design, but you could use any design
- You probably want to [use your own measurements](/reference/api/settings/measurements)
or you could use `@freesewing/models` to load measurements from [our sizing grid](https://freesewing.org/sizes/)
- We are using `@freesewing/plugin-theme` to theme our SVG, but you
could [pass in your own CSS](/guides/plugins/using-hooks-without-plugin)
- We are using `@freesewing/aaron` as the design, but you could use any design
- You probably want to [use your own measurements](/reference/api/settings/measurements)
or you could use `@freesewing/models` to load measurements from [our sizing grid](https://freesewing.org/sizes/)
- We are using `@freesewing/plugin-theme` to theme our SVG, but you
could [pass in your own CSS](/guides/plugins/using-hooks-without-plugin)
</Note>
@ -77,11 +77,11 @@ could [pass in your own CSS](/guides/plugins/using-hooks-without-plugin)
The code above will only work if you've got the required dependencies installed on your system.
Obviously you need NodeJS, but you will also need the following packages:
- `@freesewing/core`: Our core library
- `@freesewing/plugin-bundle`: Set of common plugins
- `@freesewing/aaron` or any design you want to use
- Any design on which the design you choose is built. In this case, Aaron depends on `@freesewing/brian`
- `@freesewing/utils`
- `@freesewing/core`: Our core library
- `@freesewing/plugin-bundle`: Set of common plugins
- `@freesewing/aaron` or any design you want to use
- Any design on which the design you choose is built. In this case, Aaron depends on `@freesewing/brian`
- `@freesewing/utils`
For the example above, your `package.json` **dependencies** section will look like this:

View file

@ -2,7 +2,6 @@
title: Common git challenges
---
Git is a distributed version control system originally created by
Linus Torvalds (of linux fame).
Much like Linux itself, git is immensly powerful yet can be intimidating
@ -17,7 +16,7 @@ Below are some common challenges when working with FreeSewing code in git:
##### Git what now?
If you've never heard of git, if you're not even sure what a version
control system is, I recommend
control system is, I recommend
this [Learn Git in 15 Minutes](https://www.youtube.com/watch?v=USjZcfj8yxE&) introduction video.
If you've used git before, but always felt confused about how it works,
@ -25,4 +24,3 @@ check out this [Git For Ages 4 And Up](https://youtu.be/1ffBJ4sVUb4?t=121) video
A bit longer, but it well worth a watch.
</Tip>

View file

@ -94,11 +94,10 @@ Date: Sun Jan 16 13:48:15 2022 +0100
```
Instead, all the previous changes are now staged, and we can do a new commit,
and rewrite our for quick-save commits into one commit that only commits the
and rewrite our for quick-save commits into one commit that only commits the
end result of our repeated attempts.
This approach keeps the commit history clean, not to mention that it makes
you look like a total boss who gets everything right at the first attempt.
[1]: https://github.com/freesewing/freesewing/commit/5204ff5c16327962108e1629716e045275d3bf84

View file

@ -9,18 +9,15 @@ about: |
ask questions or share your feedback
---
Our [chatrooms on Discord](https://discord.freesewing.org/) are the best place to
Our [chatrooms on Discord](https://discord.freesewing.org/) are the best place to
ask questions or share your feedback.
Many of the FreeSewing contributors hang out there, and since we're spread over
different parts of the world, you're likely to find somebody there who can answer
your question(s) at any given moment.
<Tip>
If you want to report a problem, please [create an issue](https://github.com/freesewing/freesewing/issues/new).
</Tip>

View file

@ -2,15 +2,15 @@
title: Body ambassador
---
Maybe youre unusually short or tall.
Maybe you have a bit of a pot belly or very large breasts.
Maybe you have a disability that requires fit adjustments.
Maybe youre unusually short or tall.
Maybe you have a bit of a pot belly or very large breasts.
Maybe you have a disability that requires fit adjustments.
Whatever it is, if you represent a minority fitting issue you could
Whatever it is, if you represent a minority fitting issue you could
represent this minority to make sure their needs are heard and understood.
<Tip>
Join the `#pattern-design` channel on the Discord server and help us understand how we can design patterns that fit people with your body type.
</Tip>

View file

@ -2,10 +2,9 @@
title: Community building
---
The FreeSewing community resides [on Discord](https://discord.freesewing.org/).
The FreeSewing community resides [on Discord](https://discord.freesewing.org/).
Just being there to answer questions and chat with other people is a valuable part of community building.
We also can be found [in plenty of other places](https://freesewing.org/community/where/) where we'd love to have you join us.
Apart from being present in chat rooms and social media, you could also take on some responsibility on one or more platforms.

View file

@ -2,7 +2,6 @@
title: Develop sewing patterns
---
You could program new designs for FreeSewing.
If you're not afraid of Javascript and are happy to team up with a designer,
You could program new designs for FreeSewing.
If you're not afraid of Javascript and are happy to team up with a designer,
you could work on a new pattern together.

View file

@ -2,7 +2,7 @@
title: Ways to contribute
---
Thank you for being part of our community, and for wanting to contribute! ❤️
Thank you for being part of our community, and for wanting to contribute! ❤️\
FreeSewing is an open source project ran by volunteers from different corners of the world.
We would love to have you on board, and this page lists everything you need to know to get started.
@ -13,8 +13,8 @@ value a safe and welcoming environment for all members of the FreeSewing communi
To that extend, we impose the following requirements to ensure everyone feels safe and welcome:
- Any member of our community must respect [our community standards](https://freesewing.org/docs/various/community-standards/)
- As a contributor, you must uphold [our Code of Conduct](/guides/code-of-conduct/)
- Any member of our community must respect [our community standards](https://freesewing.org/docs/various/community-standards/)
- As a contributor, you must uphold [our Code of Conduct](/guides/code-of-conduct/)
Go ahead and read those, we'll wait.
@ -22,16 +22,16 @@ Go ahead and read those, we'll wait.
With that out of the way, here's a few more things that are *good to know*:
- Nobody gets paid to work on/for FreeSewing. We are a 100% volunteer organisation.
- We have patrons who support us financially, but all the money that comes in goes to charity —
See our [revenue pledge](https://freesewing.org/docs/various/pledge/) for details
- FreeSewing follows the [all-contributors](https://allcontributors.org/) specification.
Contributions of any kind are welcome.
- Nobody gets paid to work on/for FreeSewing. We are a 100% volunteer organisation.
- We have patrons who support us financially, but all the money that comes in goes to charity —
See our [revenue pledge](https://freesewing.org/docs/various/pledge/) for details
- FreeSewing follows the [all-contributors](https://allcontributors.org/) specification.
Contributions of any kind are welcome.
## Where to begin
Below is a list of ideas or roles you could take up.
If you're not sure what to do, or if you have questions, [please reach out to
If you're not sure what to do, or if you have questions, [please reach out to
us](https://discord.freesewing.org/).
<ReadMore />
@ -43,12 +43,9 @@ us](https://discord.freesewing.org/).
For many in our community, contributring to FreeSewing marked their
first steps into the world of open source software development.
I (joost) am happy to provide guidance or mentorship to anyone who
I (joost) am happy to provide guidance or mentorship to anyone who
wants to learn, especially when doing so enables upwards social mobility.
[Reach out](https://discord.freesewing.org/) and we let's do this.
</Comment>

View file

@ -4,4 +4,3 @@ title: Make illustrations
Our documentation can always use some more/better illustrations to help people figure out how
to make our patterns into garments.

View file

@ -2,7 +2,6 @@
title: Language ambassador
---
You could represent FreeSewing in a non-English community.
There, you can help answer questions or triage problem reports.
You could represent FreeSewing in a non-English community.
There, you can help answer questions or triage problem reports.
Or you can point out where translations are missing.

View file

@ -2,8 +2,8 @@
title: Pattern ambassador
---
You could take charge of a specific FreeSewing design/pattern.
You could take charge of a specific FreeSewing design/pattern.
Youll be the person to ask questions about how to make that pattern.
Youll make sure the documentation is not forgotten.
Youll be the person to ask questions about how to make that pattern.
Youll make sure the documentation is not forgotten.
And you can help with questions or triage problem reports to developers or designers.

View file

@ -5,7 +5,7 @@ title: Pattern testing
You could make (a muslin for) our patterns prior to release to make sure everything is ok.
<Tip>
Join the `#pattern-design` channel on the Discord server and let us know you would like to help. Here you will find people designing new patterns and reviewing existing patterns. Feedback is very welcome!
</Tip>

View file

@ -9,7 +9,6 @@ organize milestones, and so on.
This is helpful in more than one way:
- It reduces the cognitive load of the people implementing changes because they don't have to worry about forgetting things
- It increases transparency by making it clear what sort of things are being worked on
- It gives us that good feeling of closing the issue when the task is done
- It reduces the cognitive load of the people implementing changes because they don't have to worry about forgetting things
- It increases transparency by making it clear what sort of things are being worked on
- It gives us that good feeling of closing the issue when the task is done

View file

@ -2,17 +2,16 @@
title: Report bugs
---
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/).
Create an issue [in our monorepo](https://github.com/freesewing/freesewing/issues/new?assignees=&labels=%F0%9F%90%9B+bug&template=bug-report.md&title=Bug+report) if you've found one.
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/).
Create an issue [in our monorepo](https://github.com/freesewing/freesewing/issues/new?assignees=\&labels=%F0%9F%90%9B+bug\&template=bug-report.md\&title=Bug+report) if you've found one.
Explain the problem and include additional details to help maintainers reproduce the problem:
* **Use a clear and descriptive title** for the issue to identify the problem.
* **Describe the exact steps which reproduce the problem** in as many details as possible.
* **Include relevant information** such as your username on the site, or the person you drafted a pattern for.
- **Use a clear and descriptive title** for the issue to identify the problem.
- **Describe the exact steps which reproduce the problem** in as many details as possible.
- **Include relevant information** such as your username on the site, or the person you drafted a pattern for.
Provide more context by answering these questions:
* **Did the problem start happening recently** (e.g. it worked fine before but since the latest update it doesn't)
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
- **Did the problem start happening recently** (e.g. it worked fine before but since the latest update it doesn't)
- **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.

View file

@ -4,6 +4,5 @@ title: Showcase our patterns
Anytime somebody has made one of our patterns, we like to showcase it on [freesewing.org](https://freesewing.org/showcase/).
Unpublished showcases are tracked as [GitHub issues](https://guides.github.com/features/issues/).
Create an issue [in our monorepo](https://github.com/freesewing/freesewing/issues/new?assignees=&labels=%F0%9F%91%8D+good+first+issue%2C+%F0%9F%93%B8+showcase%2C+%F0%9F%A4%97+community&template=showcase-template.md&title=Create+showcase+from+this+content) when you've made one of our patterns, or have come across pictures from another maker who did.
Unpublished showcases are tracked as [GitHub issues](https://guides.github.com/features/issues/).
Create an issue [in our monorepo](https://github.com/freesewing/freesewing/issues/new?assignees=\&labels=%F0%9F%91%8D+good+first+issue%2C+%F0%9F%93%B8+showcase%2C+%F0%9F%A4%97+community\&template=showcase-template.md\&title=Create+showcase+from+this+content) when you've made one of our patterns, or have come across pictures from another maker who did.

View file

@ -2,6 +2,5 @@
title: Translation
---
You could translate FreeSewing into one of its additional languages
(French, German, Dutch, Spanish). Or if youre ambitious, add a new one.
You could translate FreeSewing into one of its additional languages
(French, German, Dutch, Spanish). Or if youre ambitious, add a new one.

View file

@ -4,12 +4,11 @@ title: Triage issues
Triaging issues is a great way to get involved in FreeSewing. You can do tasks such as:
- Making sure issues are properly labeled
- Ensuring they have a good title that explains the issue in brief
- Assigning issues to people to make sure they are tended to
- Keeping an eye on stale issues, and either updating or closing them
- Assigning issues to milestones so we can plan our releases
- Making sure issues are properly labeled
- Ensuring they have a good title that explains the issue in brief
- Assigning issues to people to make sure they are tended to
- Keeping an eye on stale issues, and either updating or closing them
- Assigning issues to milestones so we can plan our releases
All FreeSewing contributors have triage permissions that allows them to do this.
If you don't have the rights, or bump into any issues, [reach out to us on Discord](https://discord.freesewing.org).