chore: Port FreeSewing.dev to docusaurus
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus setup. It's part of my efforts to simplify FreeSewing's setup so we can focus on our core value proposition.
This commit is contained in:
parent
497633d1d3
commit
ab3204f9f1
692 changed files with 11037 additions and 20674 deletions
36
sites/dev/docs/howtos/code/from/readme.mdx
Normal file
36
sites/dev/docs/howtos/code/from/readme.mdx
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
title: Part inheritance
|
||||
---
|
||||
|
||||
Part inheritance means that rather than start your part from a blank slate, your starting point is another part.
|
||||
You will _inherit_ all its points, paths, and snippets, hence the name.
|
||||
|
||||
:::warning
|
||||
Do not confuse this with [part dependencies](/howtos/code/after).
|
||||
:::
|
||||
|
||||
Part inheritance is configured with [the `from`
|
||||
keyword](/reference/api/part/config/dependencies#from). Let's look at an
|
||||
example:
|
||||
|
||||
```js
|
||||
// highlight-start
|
||||
import { front as brianFront } from '@freesewing/brian'
|
||||
// highlight-end
|
||||
|
||||
export const front = {
|
||||
name: 'example.front',
|
||||
// highlight-start
|
||||
from: brianFront,
|
||||
// highlight-end
|
||||
draft: function ({ part }) {
|
||||
// Design part here
|
||||
return part
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
:::tip
|
||||
Refer to [the part documentation on
|
||||
dependencies](/reference/api/part/config/dependencies) for all details.
|
||||
:::
|
Loading…
Add table
Add a link
Reference in a new issue