You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/layout-package/layout-package-create.md
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ Creating a layout package is easy
7
7
```bash
8
8
lib
9
9
├── styleguide.config.js
10
+
├── options.js
10
11
├── favicons
11
12
│ └── index.js
12
13
├── Layout
@@ -22,6 +23,24 @@ lib
22
23
23
24
> If you don't respect this file structure, you can use [`createConfig`](#create-config) options to set the new file structure.
24
25
26
+
**`styleguide.config.js`**
27
+
28
+
It is react-styleguidist configuration that will be applied in ours.
29
+
30
+
It must return an `Object`.
31
+
32
+
**`options.js`**
33
+
34
+
It is $PACKAGE_NAME options that will be applied by ours after autoconfiguration, which means path for autoconfiguration cannot be reconfigured through this.
console.log(`We cannot find the layout for package ${opts.layout}, it must be installed.`);// eslint-disable-line no-console
119
128
}
@@ -135,6 +144,7 @@ function retrieveComponentsApiPath(defaultStyleGuidePath, defaultWrapperPath, pk
135
144
finalConfigExtension,
136
145
finalLoadersExtension,
137
146
finalFaviconExtension,
147
+
finalOptionsExtension,
138
148
};
139
149
}
140
150
@@ -155,6 +165,7 @@ function retrieveComponentsApiPath(defaultStyleGuidePath, defaultWrapperPath, pk
155
165
* @param {string} [options.licensePath=LICENSE.md] options.licensePath - Location of the license within your project
156
166
* @param {string} [options.locale=en] options.locale - Locale used for the documentation
157
167
* @param {string} [options.loader=wave] options.loader - Loader to be used for the documentation
168
+
* @param {string} [options.optionsPath=lib/options.js] options.optionsPath - Object of options that will be hooked and used for generating the configuration. This options **can't** contains options related to path and autoconfigrauton, it can **only** exploit features that happen after.
158
169
* @param {Object} [options.loaders={ wave: '<!-- content of wave loader >' }] options.loaders - object available for use (if layout package is installed, they will be automatically added during autoconfiguration)
159
170
* @param {boolean} [options.loaderInnerApp=true] options.loaderInnerApp - If set to false, the loader will be injected in the main html outside of the react application context
160
171
* @param {string} [options.favicon=null] options.favicon - favicon name
0 commit comments