Skip to content

Commit 22d1bf1

Browse files
committed
chore(docs): test doc generation
closes #826 `lerna run docs` works perfectly
1 parent 3b9769e commit 22d1bf1

File tree

2 files changed

+62
-67
lines changed

2 files changed

+62
-67
lines changed

packages/core/docs/README.md

Lines changed: 49 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
`patternlab-node` can be required within any Node environment, taking in a configuration file at instantiation.
1010

11-
```javascript
11+
``` javascript
1212
const config = require('./patternlab-config.json');
1313
const patternlab = require('patternlab-node')(config);
1414
```
@@ -23,101 +23,96 @@ Many of these functions are exposed to users within [Editions](https://github.co
2323

2424
## `getDefaultConfig()` ⇒ <code>object</code>
2525

26-
Returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation.
27-
28-
**Returns**: <code>object</code> - Returns the object representation of the `patternlab-config.json`
26+
Returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation.
2927

28+
**Returns**: <code>object</code> - Returns the object representation of the `patternlab-config.json`
3029
## `version()` ⇒ <code>void</code>
3130

32-
Logs current version to standard output
33-
34-
**Returns**: <code>void</code> - current patternlab-node version as defined in `package.json`
31+
Logs current version to standard output
3532

33+
**Returns**: <code>void</code> - current patternlab-node version as defined in `package.json`
3634
## `v()` ⇒ <code>string</code>
3735

38-
Returns current version
39-
40-
**Returns**: <code>string</code> - current patternlab-node version as defined in `package.json`, as string
36+
Returns current version
4137

38+
**Returns**: <code>string</code> - current patternlab-node version as defined in `package.json`, as string
4239
## `build(options)` ⇒ <code>Promise</code>
4340

44-
Builds patterns, copies assets, and constructs user interface
41+
Builds patterns, copies assets, and constructs user interface
4542

46-
**Returns**: <code>Promise</code> - a promise fulfilled when build is complete
43+
**Returns**: <code>Promise</code> - a promise fulfilled when build is complete
4744

48-
| Param | Type | Description |
49-
| ------------------- | ------------------- | ----------------------------------------------------------------------------------------------- |
50-
| options | <code>object</code> | an object used to control build behavior |
51-
| options.cleanPublic | <code>bool</code> | whether or not to delete the configured output location (usually `public/`) before build |
52-
| options.data | <code>object</code> | additional data to be merged with global data prior to build |
53-
| options.watch | <code>bool</code> | whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild |
45+
| Param | Type | Description |
46+
| --- | --- | --- |
47+
| options | <code>object</code> | an object used to control build behavior |
48+
| options.cleanPublic | <code>bool</code> | whether or not to delete the configured output location (usually `public/`) before build |
49+
| options.data | <code>object</code> | additional data to be merged with global data prior to build |
50+
| options.watch | <code>bool</code> | whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild |
5451

5552
## `getDefaultConfig()` ⇒ <code>object</code>
5653

57-
Returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation.
58-
59-
**Returns**: <code>object</code> - Returns the object representation of the `patternlab-config.json`
54+
Returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation.
6055

56+
**Returns**: <code>object</code> - Returns the object representation of the `patternlab-config.json`
6157
## `getSupportedTemplateExtensions()` ⇒ <code>Array.&lt;string&gt;</code>
6258

63-
Returns all file extensions supported by installed PatternEngines
64-
65-
**Returns**: <code>Array.&lt;string&gt;</code> - all supported file extensions
59+
Returns all file extensions supported by installed PatternEngines
6660

61+
**Returns**: <code>Array.&lt;string&gt;</code> - all supported file extensions
6762
## `help()` ⇒ <code>void</code>
6863

69-
Logs usage to standard output
70-
71-
**Returns**: <code>void</code> - pattern lab API usage, as console output
64+
Logs usage to standard output
7265

66+
**Returns**: <code>void</code> - pattern lab API usage, as console output
7367
## `installplugin(pluginName)` ⇒ <code>void</code>
7468

75-
Installs plugin already available via `node_modules/`
69+
Installs plugin already available via `node_modules/`
70+
7671

77-
| Param | Type | Description |
78-
| ---------- | ------------------- | -------------- |
72+
| Param | Type | Description |
73+
| --- | --- | --- |
7974
| pluginName | <code>string</code> | name of plugin |
8075

8176
## `liststarterkits()` ⇒ <code>Promise</code>
8277

83-
Fetches starterkit repositories from pattern-lab github org that contain 'starterkit' in their name
84-
85-
**Returns**: <code>Promise</code> - Returns an Array<{name,url}> for the starterkit repos
78+
Fetches starterkit repositories from pattern-lab github org that contain 'starterkit' in their name
8679

80+
**Returns**: <code>Promise</code> - Returns an Array<{name,url}> for the starterkit repos
8781
## `loadstarterkit(starterkitName, clean)` ⇒ <code>void</code>
8882

89-
Loads starterkit already available via `node_modules/`
83+
Loads starterkit already available via `node_modules/`
84+
9085

91-
| Param | Type | Description |
92-
| -------------- | -------------------- | -------------------------------------------------------- |
93-
| starterkitName | <code>string</code> | name of starterkit |
94-
| clean | <code>boolean</code> | whether or not to delete contents of source/ before load |
86+
| Param | Type | Description |
87+
| --- | --- | --- |
88+
| starterkitName | <code>string</code> | name of starterkit |
89+
| clean | <code>boolean</code> | whether or not to delete contents of source/ before load |
9590

9691
## `patternsonly(options)` ⇒ <code>Promise</code>
9792

98-
Builds patterns only, leaving existing user interface files intact
93+
Builds patterns only, leaving existing user interface files intact
9994

100-
**Returns**: <code>Promise</code> - a promise fulfilled when build is complete
95+
**Returns**: <code>Promise</code> - a promise fulfilled when build is complete
10196

102-
| Param | Type | Description |
103-
| ------------------- | ------------------- | ---------------------------------------------------------------------------------------- |
104-
| options | <code>object</code> | an object used to control build behavior |
105-
| options.cleanPublic | <code>bool</code> | whether or not to delete the configured output location (usually `public/`) before build |
106-
| options.data | <code>object</code> | additional data to be merged with global data prior to build |
97+
| Param | Type | Description |
98+
| --- | --- | --- |
99+
| options | <code>object</code> | an object used to control build behavior |
100+
| options.cleanPublic | <code>bool</code> | whether or not to delete the configured output location (usually `public/`) before build |
101+
| options.data | <code>object</code> | additional data to be merged with global data prior to build |
107102

108103
## `serve(options)` ⇒ <code>Promise</code>
109104

110-
Build patterns, copies assets, and constructs user interface. Watches configured `source/` directories, and serves all output locally
105+
Build patterns, copies assets, and constructs user interface. Watches configured `source/` directories, and serves all output locally
111106

112-
**Returns**: <code>Promise</code> - a promise fulfilled when build is complete
107+
**Returns**: <code>Promise</code> - a promise fulfilled when build is complete
113108

114-
| Param | Type | Description |
115-
| ------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
116-
| options | <code>object</code> | an object used to control build behavior |
117-
| options.cleanPublic | <code>bool</code> | whether or not to delete the configured output location (usually `public/`) before build |
118-
| options.data | <code>object</code> | additional data to be merged with global data prior to build |
119-
| options.watch | <code>bool</code> | **ALWAYS OVERRIDDEN to `true`** whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild |
109+
| Param | Type | Description |
110+
| --- | --- | --- |
111+
| options | <code>object</code> | an object used to control build behavior |
112+
| options.cleanPublic | <code>bool</code> | whether or not to delete the configured output location (usually `public/`) before build |
113+
| options.data | <code>object</code> | additional data to be merged with global data prior to build |
114+
| options.watch | <code>bool</code> | **ALWAYS OVERRIDDEN to `true`** whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild |
120115

121-
---
116+
* * *
122117

123118
[Pattern Lab](http://patternlab.io) Node is [MIT Licensed](https://github.com/pattern-lab/patternlab-node/blob/master/LICENSE)

packages/core/docs/events.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ Learn more about [Creating Plugins](https://github.com/pattern-lab/patternlab-no
1717

1818
### `EVENTS`
1919

20-
**Kind**: Exported constant
20+
**Kind**: Exported constant
2121
<a name="module_Events--EVENTS..PATTERNLAB_BUILD_PATTERN_START"></a>
2222

2323
#### `EVENTS~PATTERNLAB_BUILD_PATTERN_START`
2424

2525
Emitted before any logic run inside `build()`, which is the entry point for single builds, pattern-only builds, run singly or when watched.
2626

27-
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
27+
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
2828
**Properties**
2929

3030
| Name | Type | Description |
@@ -37,7 +37,7 @@ Emitted before any logic run inside `build()`, which is the entry point for sing
3737

3838
Emitted after patterns are iterated over to gather data about them. Right before Pattern Lab processes and renders patterns into HTML
3939

40-
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
40+
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
4141
**Properties**
4242

4343
| Name | Type | Description |
@@ -50,7 +50,7 @@ Emitted after patterns are iterated over to gather data about them. Right before
5050

5151
Emitted after global `data.json` and `listitems.json` are read, and the supporting Pattern Lab templates are loaded into memory (header, footer, patternSection, patternSectionSubType, viewall). Right before patterns are iterated over to gather data about them.
5252

53-
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
53+
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
5454
**Properties**
5555

5656
| Name | Type | Description |
@@ -63,8 +63,8 @@ Emitted after global `data.json` and `listitems.json` are read, and the supporti
6363

6464
Emitted before all data is merged prior to a Pattern's render. Global `data.json` is merged with any pattern `.json`. Global `listitems.json` is merged with any pattern `.listitems.json`.
6565

66-
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
67-
**See**: [Pattern](https://github.com/pattern-lab/patternlab-node/blob/master/src/lib/object_factory.js#L16)
66+
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
67+
**See**: [Pattern](https://github.com/pattern-lab/patternlab-node/blob/master/src/lib/object_factory.js#L16)
6868
**Properties**
6969

7070
| Name | Type | Description |
@@ -78,8 +78,8 @@ Emitted before all data is merged prior to a Pattern's render. Global `data.json
7878

7979
Emitted before a pattern's template, HTML, and encoded HTML files are written to their output location
8080

81-
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
82-
**See**: [Pattern](https://github.com/pattern-lab/patternlab-node/blob/master/src/lib/object_factory.js#L16)
81+
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
82+
**See**: [Pattern](https://github.com/pattern-lab/patternlab-node/blob/master/src/lib/object_factory.js#L16)
8383
**Properties**
8484

8585
| Name | Type | Description |
@@ -93,8 +93,8 @@ Emitted before a pattern's template, HTML, and encoded HTML files are written to
9393

9494
Emitted after a pattern's template, HTML, and encoded HTML files are written to their output location
9595

96-
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
97-
**See**: [Pattern](https://github.com/pattern-lab/patternlab-node/blob/master/src/lib/object_factory.js#L16)
96+
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
97+
**See**: [Pattern](https://github.com/pattern-lab/patternlab-node/blob/master/src/lib/object_factory.js#L16)
9898
**Properties**
9999

100100
| Name | Type | Description |
@@ -108,7 +108,7 @@ Emitted after a pattern's template, HTML, and encoded HTML files are written to
108108

109109
Invoked when a watched asset changes. Assets include anything in `source/` that is not under `['root', 'patterns', 'data', 'meta', 'annotations', 'patternlabFiles']` which are blacklisted for specific copying.
110110

111-
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
111+
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
112112
**Properties**
113113

114114
| Name | Type | Description |
@@ -121,7 +121,7 @@ Invoked when a watched asset changes. Assets include anything in `source/` that
121121

122122
Invoked when a watched global file changes. These are files within the directories specified in `['data', 'meta']`paths.
123123

124-
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
124+
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
125125
**Properties**
126126

127127
| Name | Type | Description |
@@ -134,7 +134,7 @@ Invoked when a watched global file changes. These are files within the directori
134134

135135
Invoked when a pattern changes.
136136

137-
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
137+
**Kind**: inner property of [<code>EVENTS</code>](#exp_module_Events--EVENTS)
138138
**Properties**
139139

140140
| Name | Type | Description |

0 commit comments

Comments
 (0)