1
0
Fork 0

feat(markdown): New docs for various things

This commit is contained in:
joostdecock 2023-10-29 17:20:35 +01:00
parent 9fe93e03ce
commit 6b147d81a0
93 changed files with 1274 additions and 589 deletions

View file

@ -1,8 +0,0 @@
---
title: Store.generateMacroIds()
---
FIXME: Write docs
## Signature

View file

@ -1,5 +0,0 @@
---
title: Store.getMacroIds()
---
FIXME: Write docs

View file

@ -1,32 +0,0 @@
---
title: Store.log.debug()
---
This is the logging method for logs of `debug` level.
## Signature
```js
undefined Store.log.debug(...data)
```
Like all logging methods, this method is _variadic_.
It will add logs to the array at `store.logs.debug`.
## Example
```js
({ log, part }) => {
log.debug('Hey, I am logging')
log.debug(
'I am logging too',
"But you don't see me make a big deal out if it"
)
return part
}
```
## Notes
You can override the default logging methods in the store with a plugin.

View file

@ -1,13 +0,0 @@
---
title: Store.log
---
A **Store** is initialized with a `log` property that holds methods for logging.
Specifically, the `Store.log` property holds the following methods:
<ReadMore list />
## Notes
You can override the default logging methods in the store with a plugin.

View file

@ -1,37 +0,0 @@
---
title: Store.log.error()
---
This is the logging method for logs of `error` level.
<Note>
Logging something at the `error` level will stop FreeSewing from completing the draft of the pattern.
</Note>
## Signature
```js
undefined Store.log.error(...data)
```
Like all logging methods, this method is _variadic_.
It will add logs to the array at `store.logs.error`.
## Example
```js
({ log, part }) => {
log.error('Hey, I am logging')
log.error(
'I am logging too',
"But you don't see me make a big deal out if it"
)
return part
}
```
## Notes
You can override the default logging methods in the store with a plugin.

View file

@ -1,32 +0,0 @@
---
title: Store.log.info()
---
This is the logging method for logs of `info` level.
## Signature
```js
undefined Store.log.info(...data)
```
Like all logging methods, this method is _variadic_.
It will add logs to the array at `store.logs.info`.
## Example
```js
({ log, part }) => {
log.info('Hey, I am logging')
log.info(
'I am logging too',
"But you don't see me make a big deal out if it"
)
return part
}
```
## Notes
You can override the default logging methods in the store with a plugin.

View file

@ -1,32 +0,0 @@
---
title: Store.log.warn()
---
This is the logging method for logs of `warn` level (warning).
## Signature
```js
undefined Store.log.warn(...data)
```
Like all logging methods, this method is _variadic_.
It will add logs to the array at `store.logs.warn`.
## Example
```js
({ log, part }) => {
log.warn('Hey, I am logging')
log.warn(
'I am logging too',
"But you don't see me make a big deal out if it"
)
return part
}
```
## Notes
You can override the default logging methods in the store with a plugin.

View file

@ -1,46 +0,0 @@
---
title: Store.pack()
---
A **Store** is initialized with a `log` property that holds methods for logging.
Specifically, the `Store.log` property holds the following methods:
- `Store.log.debug()`: Logs at the debug level
- `Store.log.info()`: Logs at the info level
- `Store.log.warning()`: Logs at the warning level
- `Store.log.error()`: Logs at the error level
<Note>
If errors are logged, FreeSewing will not try to layout the pattern.
</Note>
## Signature
This signature is for the `info` level, but applies to all methods/levels:
```js
undefined Store.log.info(...data)
```
All logging methods are _variadic_, they will add logs to the array at `store.logs`.
So logging with `Store.log.info()` will add the logs to the array at `Store.logs.info`.
## Example
```js
({ log, part }) => {
log.info('Hey, I am logging')
log.debug(
'I am logging too',
`But you don't see me make a big deal out if it`
)
return part
}
```
## Notes
You can override the default logging methods in the store with a plugin.

View file

@ -1,5 +0,0 @@
---
title: Store.removeMacroNodes()
---
FIXME: Write docs

View file

@ -1,5 +0,0 @@
---
title: Store.storeMacroIds()
---
FIXME: Write docs