chore(markdown): Linting of dev docs
This commit is contained in:
parent
1d8beedd44
commit
265ad404da
317 changed files with 1281 additions and 1503 deletions
|
@ -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.
|
||||
|
||||
|
||||
|
|
|
@ -3,4 +3,3 @@ title: FreeSewing in different environments
|
|||
---
|
||||
|
||||
You can use FreeSewing a different environments:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue