Skip to content

Commit 801bdb4

Browse files
committed
docs: move docs to new structure
1 parent 0dcf175 commit 801bdb4

File tree

5 files changed

+11
-135
lines changed

5 files changed

+11
-135
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ const MyComponent = mock();
6969
- [`<Router>`](./docs/route.md#router), [`<Route>`](./docs/route.md#route), [`withRoute()`](./docs/route.md#withroute), `@withRoute`, `go()`, and `<Go>`
7070
- [`<Translations>`](./docs/translate.md#translations), [`<Translate>`](./docs/translate.md#translate-or-t), [`<T>`](./docs/translate.md#translate-or-t), [`withT()`](./docs/translate.md#witht-hoc), and [`@withT`](./docs/translate.md#witht-decorator)
7171
- Generators
72-
- [`<Audio>`](./docs/Audio.md), [`<Video>`](./docs/Video.md), and `<Media>`
72+
- [`<Audio>`](./src/Audio/__docs__/en/Audio.md), [`<Video>`](./docs/Video.md), and `<Media>`
7373
- [`<LocalStorage>`](./docs/LocalStorage.md), `<SessionStorage>`, `<IndexedDb>`
74-
- [`<Speak>`](./docs/Speak.md), [`<Vibrate>`](./docs/Vibrate.md), [`<Alert>`](./docs/Alert.md), `<Prompt>`, `<Confirm>`
74+
- [`<Speak>`](./docs/Speak.md), [`<Vibrate>`](./docs/Vibrate.md), [`<Alert>`](./src/Alert/__docs__/en/Alert.md), `<Prompt>`, `<Confirm>`
7575
- [`go()`](./docs/route.md#go), `<Redirect>`, `<Link>`, [`<Sms>`](./docs/Sms.md), [`<Mailto>`](./docs/Mailto.md), and `<Tel>`
7676
- [`<FullScreen>`](./docs/FullScreen.md)
7777
- UI

docs/Alert.md

-16
This file was deleted.

docs/Audio.md

-111
This file was deleted.

docs/en/loadable.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ Create a mock React component whose implementation is loaded using a promise whe
77
Create a loadable React component and immediately load it.
88

99
```js
10-
const loader = () => import('./path/to/image.svg').then((module) => module.MySVGComponent);
10+
const loader = () => import('./path/to/image.svg')
11+
.then((module) => module.MySVGComponent);
12+
1113
const SVGImage = loadable({
12-
loader
14+
loader
1315
});
1416

1517
SVGImage.load();
@@ -31,10 +33,10 @@ const LoadableComp = loadable({
3133
loadable: (params: ILoadableParams) => ILoadableComponent;
3234

3335
interface ILoadableParams extends IMockParams {
34-
loader: () => Promise<React.ComponentClass>,
36+
loader: () => Promise<React.ComponentClass>,
3537
}
3638

3739
interface ILoadableComponent extends React.ComponentClass {
38-
load();
40+
load();
3941
}
4042
```

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@
8686
"test:watch": "jest --watch",
8787
"test:story": "start-storybook -p 6007",
8888
"test:story:build": "build-storybook",
89-
"docs:watch": "gitbook serve ./docs",
89+
"docs:prepare": "node ./scripts/build_docs.js",
90+
"docs:serve": "npm run docs:clean && npm run docs:prepare && gitbook serve ./dist_docs",
9091
"docs:clean": "rimraf dist_docs",
91-
"docs:build": "node ./scripts/build_docs.js"
92+
"docs:build": "npm run docs:clean && npm run docs:prepare && gitbook build ./dist_docs"
9293
},
9394
"jest": {
9495
"moduleFileExtensions": [

0 commit comments

Comments
 (0)