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

@ -14,6 +14,7 @@ This Code of Conduct is an almost verbatim copy of the [Contributor Covenant][ho
available at [http://contributor-covenant.org/version/2/0][version] available at [http://contributor-covenant.org/version/2/0][version]
[homepage]: http://contributor-covenant.org [homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/2/0/ [version]: http://contributor-covenant.org/version/2/0/
</Note> </Note>

View file

@ -4,10 +4,12 @@ order: 10
--- ---
##### Community Impact ##### Community Impact
Use of inappropriate language or other behavior Use of inappropriate language or other behavior
deemed unprofessional or unwelcome in the community. deemed unprofessional or unwelcome in the community.
##### Consequence ##### Consequence
A private, written warning from community leaders, A private, written warning from community leaders,
providing clarity around the nature of the violation and an providing clarity around the nature of the violation and an
explanation of why the behavior was inappropriate. explanation of why the behavior was inappropriate.

View file

@ -4,10 +4,12 @@ order: 40
--- ---
##### Community Impact ##### Community Impact
Demonstrating a pattern of violation of Demonstrating a pattern of violation of
community standards, including sustained inappropriate behavior, community standards, including sustained inappropriate behavior,
harassment of an individual, or aggression toward or harassment of an individual, or aggression toward or
disparagement of classes of individuals. disparagement of classes of individuals.
##### Consequence ##### Consequence
A permanent ban from any sort of public interaction within the community. A permanent ban from any sort of public interaction within the community.

View file

@ -4,10 +4,12 @@ order: 30
--- ---
##### Community Impact ##### Community Impact
A serious violation of community standards, A serious violation of community standards,
including sustained inappropriate behavior. including sustained inappropriate behavior.
##### Consequence ##### Consequence
A temporary ban from any sort of interaction or A temporary ban from any sort of interaction or
public communication with the community for a specified period public communication with the community for a specified period
of time. of time.
@ -17,4 +19,3 @@ involved, including unsolicited interaction with those enforcing
the Code of Conduct, is allowed during this period. the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban. Violating these terms may lead to a permanent ban.

View file

@ -4,10 +4,12 @@ order: 20
--- ---
##### Community Impact ##### Community Impact
A violation through a single incident or series of actions. A violation through a single incident or series of actions.
##### Consequence ##### Consequence
A warning with consequences for continued behavior.
A warning with consequences for continued behavior.\
No interaction with the people involved, including unsolicited No interaction with the people involved, including unsolicited
interaction with those enforcing the Code of Conduct, for a interaction with those enforcing the Code of Conduct, for a
specified period of time. This includes avoiding interactions specified period of time. This includes avoiding interactions

View file

@ -13,4 +13,3 @@ All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and All community leaders are obligated to respect the privacy and
security of the reporter of any incident. security of the reporter of any incident.

View file

@ -13,4 +13,3 @@ religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community. diverse, inclusive, and healthy community.

View file

@ -9,4 +9,3 @@ when an individual is officially representing the FreeSewing community in public
Examples of representing our community include using an official e-mail address, Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed representative posting via an official social media account, or acting as an appointed representative
at an online or offline event. at an online or offline event.

View file

@ -24,14 +24,12 @@ where your documentation should go based on what it's trying to accomplish:
![A graphic showing a visual representation of our documentation ![A graphic showing a visual representation of our documentation
structure](docs.png "A visual representation of how our documentation is structured") structure](docs.png "A visual representation of how our documentation is structured")
- Write a **Tutorial** is your aim is to help people learn the platform - Write a **Tutorial** is your aim is to help people learn the platform
- Write a **Guide** if your aim is to further people's understanding of a topic by going a bit deeper - Write a **Guide** if your aim is to further people's understanding of a topic by going a bit deeper
- Write a **Howto** if your ain is to help people accomplish a task - Write a **Howto** if your ain is to help people accomplish a task
- Write **Reference** documentation to detail how things work under the hood - Write **Reference** documentation to detail how things work under the hood
- Refer people to **Discord or Github** for things that are not (yet) covered in our documentation - Refer people to **Discord or Github** for things that are not (yet) covered in our documentation
<Note> <Note>
##### Based on a talk by Daniele Procida ##### Based on a talk by Daniele Procida
@ -41,4 +39,3 @@ on [this talk by Daniele Procida](https://www.youtube.com/watch?v=t4vKPhjcMZg) a
PyCon AU 2017. PyCon AU 2017.
</Note> </Note>

View file

@ -5,7 +5,6 @@ order: zbb
You can find a list of all FreeSewing guides below: You can find a list of all FreeSewing guides below:
<ReadMore recurse /> <ReadMore recurse />
<Related> <Related>
@ -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). For more details, refer to [How we structure our documentation](/guides/docs).
</Related> </Related>

View file

@ -46,6 +46,3 @@ The following language codes are supported:
- `mdx` for MDX - `mdx` for MDX
- `jsx` for JSX - `jsx` for JSX
- `json` for JSON - `json` for JSON

View file

@ -3,7 +3,7 @@ title: Custom components
order: 90 order: 90
--- ---
The way we render markdown on our websites is through the use of [MDX](https://mdxjs.com/). The way we render markdown on our websites is through the use of [MDX](https://mdxjs.com/).\
This allows us to extend Markdown with our own so-called *custom components*. This allows us to extend Markdown with our own so-called *custom components*.
Such custom components allow us to put things in Markdown content that would Such custom components allow us to put things in Markdown content that would
@ -42,7 +42,6 @@ The **Comment** component requires a `by` attribute that lists the author of the
<Comment by="joost">**Do** try this at home</Comment> <Comment by="joost">**Do** try this at home</Comment>
``` ```
## Fixme ## Fixme
<Fixme> <Fixme>
@ -62,7 +61,6 @@ or can't fix it now.
</Fixme> </Fixme>
``` ```
## Note ## Note
<Note> <Note>
@ -91,6 +89,7 @@ It's typically used on overview pages, such as out [markdown guide](/guides/mark
It won't show anything on this page, since this page has not child-pages. It won't show anything on this page, since this page has not child-pages.
## Related ## Related
<Related> <Related>
This snippet is provided by [the buttons plugin](/reference/plugins/buttons) This snippet is provided by [the buttons plugin](/reference/plugins/buttons)
</Related> </Related>
@ -104,6 +103,7 @@ Use **Related** to add something that is relevant to the current topic.
``` ```
## Tip ## Tip
<Tip> <Tip>
Comparing yourself to others is the fastest way to become unhappy Comparing yourself to others is the fastest way to become unhappy
</Tip> </Tip>
@ -117,6 +117,7 @@ Use **Tip** for, you know, tips.
``` ```
## Warning ## Warning
<Warning> <Warning>
##### Please make a backup ##### Please make a backup
Following these instructions will remove all your data Following these instructions will remove all your data
@ -150,6 +151,3 @@ Embed a playlist:
```md ```md
<YouTube id='PL1gv5yv3DoZOFSXz7yydeV1H8m6pfwstn' playlist /> <YouTube id='PL1gv5yv3DoZOFSXz7yydeV1H8m6pfwstn' playlist />
``` ```

View file

@ -26,4 +26,3 @@ In this guide, we'll look at the following topics:
This will be enough to get you started. If you'd like to learn more, This will be enough to get you started. If you'd like to learn more,
visit [markdownguide.org](https://www.markdownguide.org/). visit [markdownguide.org](https://www.markdownguide.org/).

View file

@ -43,12 +43,13 @@ See first list item for an example.
### Lining within the same website ### Lining within the same website
When you are linking within freesewing.dev or freesewing.org you can use a relative link from When you are linking within freesewing.dev or freesewing.org you can use a relative link from
the site root. the site root.\
Use: Use:
```text ```text
/guides/markdown/frequent-mistakes /guides/markdown/frequent-mistakes
``` ```
instead of instead of
```text ```text
@ -111,7 +112,6 @@ sed eiusmod tempor incidunt ut labore et dolore magna aliqua.
If you're using any markdown syntax within a custom component you want to also If you're using any markdown syntax within a custom component you want to also
leave an empty line at the start and end of your component. leave an empty line at the start and end of your component.
```markdown ```markdown
Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet,
@ -125,11 +125,7 @@ sed eiusmod tempor incidunt ut labore et dolore magna aliqua.
``` ```
## Don't be shy to ask a friend ## Don't be shy to ask a friend
Learning a new language can be intimidating, whether its Javascript, Norse or Learning a new language can be intimidating, whether its Javascript, Norse or
Markdown but everyone in the Freesewing community is glad you're here and Markdown but everyone in the Freesewing community is glad you're here and
helping us make the site even more awesome. helping us make the site even more awesome.

View file

@ -25,4 +25,3 @@ text where you are including the image. That way, you just need to specify
the image name, and not the path to its location. the image name, and not the path to its location.
</Tip> </Tip>

View file

@ -7,10 +7,11 @@ order: 30
You can make text *italic* or **bold** You can make text *italic* or **bold**
by wrapping it in 1 or 2 asterisk respectively. by wrapping it in 1 or 2 asterisk respectively.
``` ```
You can make text *italic* or **bold** by wrapping it in 1 or 2 asterisk respectively: You can make text *italic* or **bold** by wrapping it in 1 or 2 asterisk respectively:
```md ```md
Alternatively, you can also use underscores to mark _italic_ or __bold__. Alternatively, you can also use underscores to mark _italic_ or __bold__.
``` ```
Alternatively, you can also use underscores to mark _italic_ or __bold__.
Alternatively, you can also use underscores to mark *italic* or **bold**.

View file

@ -11,6 +11,5 @@ Like
this. this.
``` ```
Like Like\
this. this.

View file

@ -8,6 +8,7 @@ Links combine square brackets for the link text with round brackets for the dest
```md ```md
[Like this](https://freesewing.org) [Like this](https://freesewing.org)
``` ```
[Like this](https://freesewing.org) [Like this](https://freesewing.org)
An alternative notation allows you to include the links as such: An alternative notation allows you to include the links as such:
@ -22,6 +23,7 @@ See [the reference documentation][1] on [freesewing.dev][2]
See [the reference documentation][1] on [freesewing.dev][2] See [the reference documentation][1] on [freesewing.dev][2]
[1]: https://freesewing.dev/reference [1]: https://freesewing.dev/reference
[2]: https://freesewing.dev/reference [2]: https://freesewing.dev/reference
You don't have to use numbers, but can also use named references. You don't have to use numbers, but can also use named references.
@ -35,4 +37,3 @@ We moved the markdown content to [our monorepo][monorepo]
We moved the markdown content to [our monorepo][monorepo] We moved the markdown content to [our monorepo][monorepo]
[monorepo]: https://github.com/freesewing/freesewing [monorepo]: https://github.com/freesewing/freesewing

View file

@ -29,5 +29,4 @@ They don't even have to be the correct numbers:
1. Item 1 1. Item 1
2. Item 2 2. Item 2
2. Item 3 3. Item 3

View file

@ -5,7 +5,6 @@ order: 70
If you need them, you can create tables too, using a structure as shown below: If you need them, you can create tables too, using a structure as shown below:
```md ```md
| Name | Description | | Name | Description |
| ---- | ----------- | | ---- | ----------- |
@ -35,4 +34,3 @@ You can change the alignment of the columns by using a colon (`:`) on the line b
| Compound | A substance composed of two or more elements. Chemically combined in definite proportions by weight | | Compound | A substance composed of two or more elements. Chemically combined in definite proportions by weight |
| Mixture | Two or more substances that are not chemically united, such as air | | Mixture | Two or more substances that are not chemically united, such as air |
| Solution | A uniform mixture of varying proportions of a solvent and a solute | | Solution | A uniform mixture of varying proportions of a solvent and a solute |

View file

@ -10,7 +10,7 @@ You can just start writing.
An empty line starts a new paragraph. An empty line starts a new paragraph.
``` ```
You can just start writing. You can just start writing.
An empty line starts a new paragraph. An empty line starts a new paragraph.

View file

@ -34,5 +34,3 @@ application.
That part is outside the scope of this guide. That part is outside the scope of this guide.
</Note> </Note>

View file

@ -16,4 +16,3 @@ If you then wanted to make a long-sleeved version of your T-shirt pattern, you o
a new sleeve part. You can re-use the `front` and `back` parts of your short-sleeved T-shirt pattern, as they did not change. a new sleeve part. You can re-use the `front` and `back` parts of your short-sleeved T-shirt pattern, as they did not change.
When developing a FreeSewing pattern, you will spend most of your time designing the individual parts. When developing a FreeSewing pattern, you will spend most of your time designing the individual parts.

View file

@ -39,4 +39,3 @@ Our example image (which, if you hadn't realized was created with FreeSewing) ha
paths in it. Each box, the arrows, the lines in the React logo, and so on. paths in it. Each box, the arrows, the lines in the React logo, and so on.
</Tip> </Tip>

View file

@ -17,4 +17,3 @@ input and will return a new instance of your pattern.
That pattern instance will have a `draft()` method which will do the actual work of That pattern instance will have a `draft()` method which will do the actual work of
drafting the pattern. Once drafted, you can either call the `render()` method on drafting the pattern. Once drafted, you can either call the `render()` method on
the pattern instance, or pass it to [our React component](/packages/components) to render it in the browser. the pattern instance, or pass it to [our React component](/packages/components) to render it in the browser.

View file

@ -35,4 +35,3 @@ Our example image (which, if you hadn't realized was created with FreeSewing) ha
points in it. The corners of the boxes, the location where the text goes, and so on. points in it. The corners of the boxes, the location where the text goes, and so on.
</Tip> </Tip>

View file

@ -21,4 +21,3 @@ of a `button`, `buttonhole`, and `logo` snippet added to a FreeSewing pattern:
<Example part="snippet"> <Example part="snippet">
An example of the use of snippets An example of the use of snippets
</Example> </Example>

View file

@ -11,4 +11,3 @@ The store provides key-value storage that is shared across your pattern.
If you have some information in one part that you want to make available If you have some information in one part that you want to make available
outside that part (in another part) you can save it to the store. outside that part (in another part) you can save it to the store.

View file

@ -20,6 +20,7 @@ const condition = settings => {
else return false // Do not load the plugin else return false // Do not load the plugin
} }
``` ```
You pass your plugin and condition method as a third parameter to the Design constructor You pass your plugin and condition method as a third parameter to the Design constructor
with the `plugin` and `condition` keys respectively. with the `plugin` and `condition` keys respectively.
@ -51,9 +52,9 @@ const Pattern = new freesewing.Design(
Our condition method will return `true` only if the following conditions are met: Our condition method will return `true` only if the following conditions are met:
- A `settings` object is passed into the method - A `settings` object is passed into the method
- `settings.options` is _truthy_ - `settings.options` is *truthy*
- `settings.options.draftForHighBust` is _truthy_ - `settings.options.draftForHighBust` is *truthy*
- `settings.options.measurements.highBust` is _truthy_ - `settings.options.measurements.highBust` is *truthy*
This is a real-world example from our Teagan pattern. A t-shirt pattern that can be This is a real-world example from our Teagan pattern. A t-shirt pattern that can be
drafted to the high bust (rather than the full chest circumference) if the user drafted to the high bust (rather than the full chest circumference) if the user
@ -62,4 +63,3 @@ choses so.
But that feat is handled auto-magically by `plugin-bust` which is a build-time plugin. But that feat is handled auto-magically by `plugin-bust` which is a build-time plugin.
So whether to load this plugin or not hinges on the user settings, which is why we So whether to load this plugin or not hinges on the user settings, which is why we
load this plugin conditionally. load this plugin conditionally.

View file

@ -18,4 +18,3 @@ called. It will receive two parameters:
- An object relevant to the hook. See the [hooks API reference](/reference/hooks/) for details. - An object relevant to the hook. See the [hooks API reference](/reference/hooks/) for details.
- Data passed when the hook was registered (optional) - Data passed when the hook was registered (optional)

View file

@ -24,4 +24,3 @@ import config from "../config"
const Pattern = new freesewing.Design(config, [plugins, gorePlugin] ) const Pattern = new freesewing.Design(config, [plugins, gorePlugin] )
``` ```

View file

@ -22,5 +22,3 @@ const myAaron = new Aaron()
Plugins that use only hooks are typically run-time plugins Plugins that use only hooks are typically run-time plugins
</Tip> </Tip>

View file

@ -61,4 +61,3 @@ to a macro needs to be contained in a single argument.
Typically, you use a single plain object to configure the macro. Typically, you use a single plain object to configure the macro.
</Note> </Note>

View file

@ -22,4 +22,3 @@ Your plugin should export an object with the following structure:
The `name` and `version` attributes are self-explanatory. The `name` and `version` attributes are self-explanatory.
The [hooks](/guides/plugins/hooks/) and [macros](/guides/plugins/macros/) sections The [hooks](/guides/plugins/hooks/) and [macros](/guides/plugins/macros/) sections
explain the `hooks` and `macros` properties. explain the `hooks` and `macros` properties.

View file

@ -25,14 +25,12 @@ Our [plugin bundle](/reference/plugins/bundle/) bundles build-time plugins that
<Note>Plugins that provide a macro are typically build-time plugins</Note> <Note>Plugins that provide a macro are typically build-time plugins</Note>
## Run-time plugins ## Run-time plugins
A plugin is a run-time plugin if it can be added after instantiating your pattern. A plugin is a run-time plugin if it can be added after instantiating your pattern.
Think of it as a plugin to be used in the front-end. Think of it as a plugin to be used in the front-end.
Run-time plugins are not a dependecy of the pattern. They just _add something_ to it. Run-time plugins are not a dependecy of the pattern. They just *add something* to it.
Our [theme plugin](/reference/plugins/theme/) is a good example of a run-time plugin. Our [theme plugin](/reference/plugins/theme/) is a good example of a run-time plugin.
If it's missing, your pattern will still work, it just won't look pretty. If it's missing, your pattern will still work, it just won't look pretty.

View file

@ -17,4 +17,3 @@ pattern.on('preRender', function(svg) {
``` ```
Congratulations, you've just made your pattern yellow. Congratulations, you've just made your pattern yellow.

View file

@ -56,4 +56,3 @@ It is good practice to wrap you hook methods in a call like this, because you ha
no guarantee the user won't render your pattern more than once. no guarantee the user won't render your pattern more than once.
</Note> </Note>

View file

@ -33,10 +33,8 @@ As long as you intuitively *get* how the control points influence the curve, you
###### More on Bézier curves ###### More on Bézier curves
Wikipedia has a good [introduction to Bézier curves](https://en.wikipedia.org/wiki/B%C3%A9zier_curve). Wikipedia has a good [introduction to Bézier curves](https://en.wikipedia.org/wiki/B%C3%A9zier_curve).\
For a deep-dive into the subject, check out [A Primer on Bézier Curves](https://pomax.github.io/bezierinfo/) by For a deep-dive into the subject, check out [A Primer on Bézier Curves](https://pomax.github.io/bezierinfo/) by
[Pomax](https://github.com/Pomax). [Pomax](https://github.com/Pomax).
</Note> </Note>

View file

@ -24,4 +24,3 @@ This is a common point of confusion so keep in mind that the Y-axis may
not behave as you would have intuitively expected. not behave as you would have intuitively expected.
</Note> </Note>

View file

@ -38,4 +38,3 @@ Few people straddle both worlds, so as you start using FreeSewing, chances are
you'll learn a few new things along the way. you'll learn a few new things along the way.
</Note> </Note>

View file

@ -12,4 +12,3 @@ will greatly help you to understand FreeSewing.
For example, the coordinate system and the way paths For example, the coordinate system and the way paths
are structured are all related to the SVG drawing system, which is closely related are structured are all related to the SVG drawing system, which is closely related
to other 2D drawing technologies such as PostScript or PDF. to other 2D drawing technologies such as PostScript or PDF.

View file

@ -12,5 +12,3 @@ When you write `1`, thats one mm. When you write `7.8`, thats 7.8mm.
While you can use cm or inch on the FreeSewing website, that is merely a layer of While you can use cm or inch on the FreeSewing website, that is merely a layer of
abstration on top of the internal units, which are always mm. abstration on top of the internal units, which are always mm.

View file

@ -27,7 +27,6 @@ Bonus: You'll get an `@freesewing.org` email alias
</Tip> </Tip>
## Languages ## Languages
We currently support the following five languages: We currently support the following five languages:
@ -129,8 +128,6 @@ These will be filled in later with the correct value. For example:
looks like this in Spanish looks like this in Spanish
```yaml ```yaml
{field} guardado {field} guardado
``` ```

View file

@ -9,7 +9,6 @@ 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: the [shorthand](/howtos/code/shorthand/) call:
```js ```js
const { measurements, options } = part.shorthand() const { measurements, options } = part.shorthand()

View file

@ -9,10 +9,8 @@ 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: the [shorthand](/howtos/code/shorthand/) call:
```js ```js
const { measurements, options } = part.shorthand() const { measurements, options } = part.shorthand()
let sleeveBonus = measurements.shoulderToWrist * (1 + options.sleeveLengthBonus); let sleeveBonus = measurements.shoulderToWrist * (1 + options.sleeveLengthBonus);
``` ```

View file

@ -12,7 +12,7 @@ about: While documentation is good, sometimes you want to add some instructions
</Note> </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. The tricky part is to make sure your text can be translated.
Below is a rather involved example from Aaron: Below is a rather involved example from Aaron:

View file

@ -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"> <Example pattern="rendertest" options_only="snippets">
Overview of available snippets Overview of available snippets
</Example> </Example>

View file

@ -48,4 +48,3 @@ paths.example = new Path()
<Example part="path_attr"> <Example part="path_attr">
Text on a path Text on a path
</Example> </Example>

View file

@ -15,4 +15,3 @@ In addition, all attributes that have a `data-circle-` prefix will apply to the
<Example pattern="rendertest" options_only="circles"> <Example pattern="rendertest" options_only="circles">
Circles Circles
</Example> </Example>

View file

@ -17,19 +17,21 @@ about: Shows how to create a variation of a pre-existing design
## Setup ## 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: 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` - 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) - create your new pattern in a clone of the [freesewing monorepo](https://github.com/freesewing/freesewing)
### When using `npx create-freesewing-pattern` ### 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. 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. Let's say you want to extend Brian.\
In your freshly created pattern folder, you now have to run In your freshly created pattern folder, you now have to run
```bash ```bash
npm install --save @freesewing/brian 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. This has to be repeated for every new pattern you create.
<Tip> <Tip>
@ -41,6 +43,7 @@ This has to be repeated for every new pattern you create.
### Using the freesewing monorepo ### 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). 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. - 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. - 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`). - 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`).

View file

@ -12,7 +12,6 @@ about: When you inherit a part, it comes with a bunch of paths. Here'show to rem
</Note> </Note>
```js ```js
for (let i in paths) delete paths[i] for (let i in paths) delete paths[i]
``` ```

View file

@ -13,7 +13,6 @@ about: Shows how to share dimensions between similar pattern parts
</Note> </Note>
When you have different pattern parts that look similar -- like the front 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. shared between them.
@ -49,8 +48,7 @@ import { dimensions } from './shared'
<Note> <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. import it with the syntax you see above.
</Note> </Note>

View file

@ -12,7 +12,7 @@ about: Shows how to store a seam length so you can true the seam of another part
</Note> </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. 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: 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() .length()
) )
``` ```

View file

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

View file

@ -13,7 +13,7 @@ about: Shows how to adapt the length of the sleevecap to fit your armhole
</Note> </Note>
Fitting the sleevecap to the armhole means that we need to make sure the length 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. 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 For all of these situations where you have to create curved seams with matching

View file

@ -12,7 +12,7 @@ about: Slash and spread is easy enough on paper, here's how to do it in code
</Note> </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. around the tip of the triangle.
And that's exactly what we do in code. We just need to know: And that's exactly what we do in code. We just need to know:

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. development environment on your operating system of choice.
<ReadMore /> <ReadMore />

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/). 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). 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 - anothercat
- somethingelse - somethingelse
``` ```

View file

@ -11,6 +11,3 @@ about: |
This is a multi-line text This is a multi-line text
that will be assigned to the about key that will be assigned to the about key
``` ```

View file

@ -5,7 +5,6 @@ order: zcc
You can find a list of all FreeSewing hotwtos below: You can find a list of all FreeSewing hotwtos below:
<ReadMore recurse /> <ReadMore recurse />
<Related> <Related>
@ -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). For more details, refer to [How we structure our documentation](/guides/docs).
</Related> </Related>

View file

@ -34,7 +34,6 @@ Which can be done as a one-liner since `use()`, `draft()` and
Below is a complete example. Below is a complete example.
```html ```html
<html> <html>
<head> <head>
@ -91,5 +90,3 @@ If you compare this example with [our NodeJS
example](/reference/howtos/nodejs) you'll notice that you do not example](/reference/howtos/nodejs) you'll notice that you do not
need to worry about loading any dependencies. Not even `@freesewing/core` need to worry about loading any dependencies. Not even `@freesewing/core`
is loaded, because Skypack will pull in all dependencies for you. 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: You can use FreeSewing a different environments:

View file

@ -2,7 +2,6 @@
title: Common git challenges title: Common git challenges
--- ---
Git is a distributed version control system originally created by Git is a distributed version control system originally created by
Linus Torvalds (of linux fame). Linus Torvalds (of linux fame).
Much like Linux itself, git is immensly powerful yet can be intimidating Much like Linux itself, git is immensly powerful yet can be intimidating
@ -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. A bit longer, but it well worth a watch.
</Tip> </Tip>

View file

@ -100,5 +100,4 @@ end result of our repeated attempts.
This approach keeps the commit history clean, not to mention that it makes 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. you look like a total boss who gets everything right at the first attempt.
[1]: https://github.com/freesewing/freesewing/commit/5204ff5c16327962108e1629716e045275d3bf84 [1]: https://github.com/freesewing/freesewing/commit/5204ff5c16327962108e1629716e045275d3bf84

View file

@ -16,11 +16,8 @@ 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 different parts of the world, you're likely to find somebody there who can answer
your question(s) at any given moment. your question(s) at any given moment.
<Tip> <Tip>
If you want to report a problem, please [create an issue](https://github.com/freesewing/freesewing/issues/new). If you want to report a problem, please [create an issue](https://github.com/freesewing/freesewing/issues/new).
</Tip> </Tip>

View file

@ -8,4 +8,3 @@ Just being there to answer questions and chat with other people is a valuable pa
We also can be found [in plenty of other places](https://freesewing.org/community/where/) where we'd love to have you join us. 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. Apart from being present in chat rooms and social media, you could also take on some responsibility on one or more platforms.

View file

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

View file

@ -2,7 +2,7 @@
title: Ways to contribute 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. 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. We would love to have you on board, and this page lists everything you need to know to get started.
@ -49,6 +49,3 @@ wants to learn, especially when doing so enables upwards social mobility.
[Reach out](https://discord.freesewing.org/) and we let's do this. [Reach out](https://discord.freesewing.org/) and we let's do this.
</Comment> </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 Our documentation can always use some more/better illustrations to help people figure out how
to make our patterns into garments. to make our patterns into garments.

View file

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

View file

@ -12,4 +12,3 @@ 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 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 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 gives us that good feeling of closing the issue when the task is done

View file

@ -3,16 +3,15 @@ title: Report bugs
--- ---
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). 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. 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: 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. - **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. - **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. - **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: 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) - **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. - **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

@ -5,5 +5,4 @@ title: Showcase our patterns
Anytime somebody has made one of our patterns, we like to showcase it on [freesewing.org](https://freesewing.org/showcase/). 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/). 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. 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

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

View file

@ -12,4 +12,3 @@ Triaging issues is a great way to get involved in FreeSewing. You can do tasks s
All FreeSewing contributors have triage permissions that allows them to do this. 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). If you don't have the rights, or bump into any issues, [reach out to us on Discord](https://discord.freesewing.org).

View file

@ -28,4 +28,3 @@ paths.demo = new Path()
paths.demo = new Path() paths.demo = new Path()
.attr('class', 'classA classB'); .attr('class', 'classA classB');
``` ```

View file

@ -17,4 +17,3 @@ paths.demo = new Path()
paths.clone = paths.demo.clone() paths.clone = paths.demo.clone()
``` ```

View file

@ -18,4 +18,3 @@ paths.demo = new Path()
let class = paths.demo.attributes.getAsArray('class'); let class = paths.demo.attributes.getAsArray('class');
// class now holds: ["classA", "classB"] // class now holds: ["classA", "classB"]
``` ```

View file

@ -41,4 +41,3 @@ In this example:
See [Part dependencies](/advanced/dependencies) for more in-depth information on dependencies. See [Part dependencies](/advanced/dependencies) for more in-depth information on dependencies.
</Tip> </Tip>

View file

@ -11,7 +11,6 @@ Note that hidden parts will be rendered when the user requests
to [only draft some parts of a pattern](/reference/api/settings/only) to [only draft some parts of a pattern](/reference/api/settings/only)
and includes the hidden part(s). and includes the hidden part(s).
## Structure ## Structure
An array of strings that holds part names. An array of strings that holds part names.

View file

@ -6,7 +6,6 @@ Option groups allow you to group options together when presenting them
to the user. They also support (one) level of sub-grouping which is to the user. They also support (one) level of sub-grouping which is
useful when your design has many options. useful when your design has many options.
<Note> <Note>
##### This section applies to frontend integration ##### This section applies to frontend integration

View file

@ -23,4 +23,3 @@ options: {
} }
} }
``` ```

View file

@ -34,4 +34,3 @@ parts of the code beyond the control of the end user, but accessible to
developers. developers.
</Tip> </Tip>

View file

@ -27,10 +27,10 @@ There are the five option types that an aspiring pattern designer should be
familiar with: familiar with:
1. [**boolean** options][bool] are for yes/no choices 1. [**boolean** options][bool] are for yes/no choices
1. [**counter** options][count] are for integer values 2. [**counter** options][count] are for integer values
1. [**degree** options][deg] are for degrees 3. [**degree** options][deg] are for degrees
1. [**list** options][list] are for a list of possible choices 4. [**list** options][list] are for a list of possible choices
1. [**percentage** options][pct] are for percentages 5. [**percentage** options][pct] are for percentages
<Tip> <Tip>
@ -45,7 +45,7 @@ For the sake of completeness, here are the two other types of options:
6. [**constant** options][const] are used as 6. [**constant** options][const] are used as
[feature flags](https://en.wikipedia.org/wiki/Feature_toggle) [feature flags](https://en.wikipedia.org/wiki/Feature_toggle)
6. [**millimeter** options][const] are **deprecated** (in favor of [snapped 7. [**millimeter** options][const] are **deprecated** (in favor of [snapped
percentage options][snapped]) percentage options][snapped])
</Related> </Related>
@ -66,7 +66,6 @@ How you configure the default value depends on the option type
</Note> </Note>
### Optionally hide options by configuring a `hide()` method ### Optionally hide options by configuring a `hide()` method
<Note> <Note>
@ -126,12 +125,16 @@ to determine whether an option should be shown or not.
</Tip> </Tip>
[bool]: /reference/api/config/options/bool [bool]: /reference/api/config/options/bool
[const]: /reference/api/config/options/const
[count]: /reference/api/config/options/count
[deg]: /reference/api/config/options/deg
[list]: /reference/api/config/options/list
[pct]: /reference/api/config/options/pct
[snapped]: /reference/api/config/options/pct/snap
[const]: /reference/api/config/options/const
[count]: /reference/api/config/options/count
[deg]: /reference/api/config/options/deg
[list]: /reference/api/config/options/list
[pct]: /reference/api/config/options/pct
[snapped]: /reference/api/config/options/pct/snap

View file

@ -34,13 +34,13 @@ options: {
##### What's wrong with millimeter options? ##### What's wrong with millimeter options?
Millimeter options do not scale. Millimeter options do not scale.
Parametric design is the _raison d'être_ of FreeSewing and that core belief Parametric design is the *raison d'être* of FreeSewing and that core belief
that things should seamlessly adapt goes out the window when you use a `mm` that things should seamlessly adapt goes out the window when you use a `mm`
option because now you have a value that will not change based on the option because now you have a value that will not change based on the
input measurements. input measurements.
You could argue that it's fine because _you can just lower the option_ You could argue that it's fine because *you can just lower the option*
but that breaks the principle of _sensible defaults_ (aka no surprises). but that breaks the principle of *sensible defaults* (aka no surprises).
The fact that you can sidestep the bullet does not mean you're not creating The fact that you can sidestep the bullet does not mean you're not creating
a footgun. a footgun.

View file

@ -19,8 +19,11 @@ Your percentage option should be a plain object with these properties:
- `snap` <small>(optional)</small> : The configuration to control [snapping of percentage options][snap] - `snap` <small>(optional)</small> : The configuration to control [snapping of percentage options][snap]
[hide]: /reference/api/config/options#optionally-hide-options-by-configuring-a-hide-method [hide]: /reference/api/config/options#optionally-hide-options-by-configuring-a-hide-method
[fromabs]: /reference/api/config/options/pct/fromabs [fromabs]: /reference/api/config/options/pct/fromabs
[toabs]: /reference/api/config/options/pct/toabs [toabs]: /reference/api/config/options/pct/toabs
[snap]: /reference/api/config/options/pct/snap [snap]: /reference/api/config/options/pct/snap
<Note> <Note>
@ -58,4 +61,3 @@ options: {
Percentage options have a few more tricks up their sleeve: Percentage options have a few more tricks up their sleeve:
<ReadMore /> <ReadMore />

View file

@ -38,7 +38,6 @@ The second parameter is the pattern's run-time configuration
or [settings](/reference/api/settings) which holds -- among other things -- the or [settings](/reference/api/settings) which holds -- among other things -- the
measurements provided by the user. measurements provided by the user.
## Example ## Example
In our example above, let's say that the `chestEase` option is In our example above, let's say that the `chestEase` option is
@ -96,4 +95,3 @@ it will also add a `toAbs()` method that does the inverse: return the
value in millimeter of whatever percentage the option is set to. value in millimeter of whatever percentage the option is set to.
See [Reporting a percentage option value in See [Reporting a percentage option value in
millimeter](/reference/api/config/options/pct/toabs) for details. millimeter](/reference/api/config/options/pct/toabs) for details.

View file

@ -236,8 +236,11 @@ to clarify the difference.
</Note> </Note>
[fromabs]: /reference/api/config/options/pct/fromabs [fromabs]: /reference/api/config/options/pct/fromabs
[toabs]: /reference/api/config/options/pct/toabs
[pct]: /reference/api/config/options/pct
[list]: /reference/api/config/options/list
[hide]: /reference/api/config/options#optionally-hide-options-by-configuring-a-hide-method
[toabs]: /reference/api/config/options/pct/toabs
[pct]: /reference/api/config/options/pct
[list]: /reference/api/config/options/list
[hide]: /reference/api/config/options#optionally-hide-options-by-configuring-a-hide-method

View file

@ -28,7 +28,6 @@ The second parameter is the pattern's run-time configuration
or [settings](/reference/api/settings) which holds -- among other things -- the or [settings](/reference/api/settings) which holds -- among other things -- the
measurements provided by the user. measurements provided by the user.
## Example ## Example
In our example above, let's say that the `chestEase` option is In our example above, let's say that the `chestEase` option is
@ -85,4 +84,3 @@ the value in millimeter of whatever percentage the option is set to -- it will
also add a `fromAbs()` method that does the inverse: return the percentage of also add a `fromAbs()` method that does the inverse: return the percentage of
any millimeter value passed into it. See [Setting a value in millimeter as a any millimeter value passed into it. See [Setting a value in millimeter as a
percentage option](/api/config/options/pct/fromabs) for details. percentage option](/api/config/options/pct/fromabs) for details.

View file

@ -28,4 +28,3 @@ parts: [
"back" "back"
] ]
``` ```

View file

@ -7,4 +7,3 @@ code: "Joost De Cock",
``` ```
The name of the developer. The name of the developer.

View file

@ -26,4 +26,3 @@ Options that are not included in the `optionGroup` configuration won't be
exposed in the frontend and thus will be unavailable to the user. exposed in the frontend and thus will be unavailable to the user.
</Note> </Note>

View file

@ -24,4 +24,3 @@ optionGroups: {
Only create subgroups one level deep. Only create subgroups one level deep.
We do not support groups in groups in groups. We do not support groups in groups in groups.
</Warning> </Warning>

View file

@ -12,7 +12,4 @@ A string that holds a valid semantic version number.
## Example ## Example
```
version: "0.3.1" version: "0.3.1"
```

View file

@ -29,7 +29,7 @@ The `@freesewing/core` default export is a single object with the following prop
<Note> <Note>
You will typically use the `Design()` constructor. You will typically use the `Design()` constructor.\
The other constructors and utilities below are exported to facilitate unit testing. The other constructors and utilities below are exported to facilitate unit testing.
</Note> </Note>
@ -40,4 +40,3 @@ The other constructors and utilities below are exported to facilitate unit testi
- `Snippet`: The [Snippet constructor](/reference/api/snippet) to create a new snippet - `Snippet`: The [Snippet constructor](/reference/api/snippet) to create a new snippet
- `utils`: A collection of [utilities](/reference/api/utils) - `utils`: A collection of [utilities](/reference/api/utils)
- `version`: A string containing the `@freesewing/core` version number - `version`: A string containing the `@freesewing/core` version number

View file

@ -44,4 +44,3 @@ Instead, you can (and should) divide your text into chunks that need translating
This is also why we're not inserting **Seam allowance** but rather **seamAllowance**; This is also why we're not inserting **Seam allowance** but rather **seamAllowance**;
It is merely a key to indicate what translation we want to replace this text with. It is merely a key to indicate what translation we want to replace this text with.

View file

@ -11,4 +11,3 @@ Like the `preRender` hook, it receives [the SVG object](/api/svg) as its first p
The `postRender` hooks is rarely used. The `postRender` hooks is rarely used.
</Note> </Note>

View file

@ -16,4 +16,3 @@ It is triggered just before the end of either:
The `postSample` hook is rarely used. The `postSample` hook is rarely used.
</Note> </Note>

View file

@ -43,4 +43,3 @@ macro('sprinkle', {
| `prefix` | | `string` | A prefix to apply to the names of the generated path and points | | `prefix` | | `string` | A prefix to apply to the names of the generated path and points |
| `suffix` | | `string` | A suffix to apply to the names of the generated path and points | | `suffix` | | `string` | A suffix to apply to the names of the generated path and points |
| `width` | `3` | `number` | Width of the bartack | | `width` | `3` | `number` | Width of the bartack |

Some files were not shown because too many files have changed in this diff Show more