From 640a0948bf57c443fc1ee4e5f34bfb1c464b6cf3 Mon Sep 17 00:00:00 2001 From: rakannimer Date: Sat, 24 Aug 2019 13:30:11 +0300 Subject: [PATCH 1/6] fix(docz-example-basic): add explicit dependency to scheduler --- examples/basic/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/basic/package.json b/examples/basic/package.json index 409bb2284..7c29316d5 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -17,7 +17,8 @@ "@emotion/styled": "^10.0.14", "prop-types": "^15.7.2", "react": "^16.8.6", - "react-dom": "^16.8.6" + "react-dom": "^16.8.6", + "scheduler": "^0.15.0" }, "devDependencies": { "docz": "^2.0.0-rc.1" From 65059d4358b88a0cb65767d52ed492cfa314fc4f Mon Sep 17 00:00:00 2001 From: rakannimer Date: Sat, 24 Aug 2019 13:31:20 +0300 Subject: [PATCH 2/6] fix(docz): make scheduler dependency explicit --- core/docz/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/core/docz/package.json b/core/docz/package.json index 83fe43ec3..9c033c7bc 100644 --- a/core/docz/package.json +++ b/core/docz/package.json @@ -33,6 +33,7 @@ "marksy": "^8.0.0", "match-sorter": "^3.1.1", "prop-types": "^15.7.2", + "scheduler": "^0.15.0", "ulid": "^2.3.0", "yargs": "^13.3.0" }, From efd61a3d2a8109dead4f435a6775a6816db870d7 Mon Sep 17 00:00:00 2001 From: rakannimer Date: Sat, 24 Aug 2019 13:31:36 +0300 Subject: [PATCH 3/6] docs(docz-example-basic): add instructions to quickly run the example --- examples/basic/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 examples/basic/README.md diff --git a/examples/basic/README.md b/examples/basic/README.md new file mode 100644 index 000000000..5bc84595d --- /dev/null +++ b/examples/basic/README.md @@ -0,0 +1,21 @@ +# Basic Docz example + +## Download manually + +```sh +curl https://codeload.github.com/pedronauck/docz/tar.gz/master | tar -xz --strip=2 docz-master/examples/basic +mv basic docz-basic-example +cd docz-basic-example +``` + +## Setup + +```sh +yarn # npm i +``` + +## Run + +```sh +yarn dev # npm run dev +``` From df087ae8d9b2bcaf2e50bbdadf82960b06c6622b Mon Sep 17 00:00:00 2001 From: rakannimer Date: Sat, 24 Aug 2019 14:58:58 +0300 Subject: [PATCH 4/6] fix(docz-example-typescript): add scheduler dep and docs --- examples/typescript/README.md | 21 +++++++++++++++++++++ examples/typescript/package.json | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 examples/typescript/README.md diff --git a/examples/typescript/README.md b/examples/typescript/README.md new file mode 100644 index 000000000..80a0a8f00 --- /dev/null +++ b/examples/typescript/README.md @@ -0,0 +1,21 @@ +# Typescript Docz example + +## Download manually + +```sh +curl https://codeload.github.com/pedronauck/docz/tar.gz/master | tar -xz --strip=2 docz-master/examples/typescript +mv typescript docz-typescript-example +cd docz-typescript-example +``` + +## Setup + +```sh +yarn # npm i +``` + +## Run + +```sh +yarn dev # npm run dev +``` diff --git a/examples/typescript/package.json b/examples/typescript/package.json index b34ee624b..3d308e038 100644 --- a/examples/typescript/package.json +++ b/examples/typescript/package.json @@ -16,7 +16,8 @@ "@emotion/core": "^10.0.14", "@emotion/styled": "^10.0.14", "react": "^16.8.6", - "react-dom": "^16.8.6" + "react-dom": "^16.8.6", + "scheduler": "^0.15.0" }, "devDependencies": { "@types/react": "^16.8.23", From 2cc1ba8db0252d209cfb5ab825c12428575a4fc2 Mon Sep 17 00:00:00 2001 From: rakannimer Date: Sat, 24 Aug 2019 16:41:26 +0300 Subject: [PATCH 5/6] fix(docz-example-flow): add @babel/preset-flow with onCreateBabelConfig --- examples/flow/gatsby-node.js | 5 +++++ examples/flow/src/components/Alert.mdx | 16 ++-------------- 2 files changed, 7 insertions(+), 14 deletions(-) create mode 100644 examples/flow/gatsby-node.js diff --git a/examples/flow/gatsby-node.js b/examples/flow/gatsby-node.js new file mode 100644 index 000000000..a8076b6c9 --- /dev/null +++ b/examples/flow/gatsby-node.js @@ -0,0 +1,5 @@ +exports.onCreateBabelConfig = ({ actions }) => { + actions.setBabelPreset({ + name: `@babel/preset-flow`, + }) +} diff --git a/examples/flow/src/components/Alert.mdx b/examples/flow/src/components/Alert.mdx index 8ec16abac..19439bea3 100644 --- a/examples/flow/src/components/Alert.mdx +++ b/examples/flow/src/components/Alert.mdx @@ -3,8 +3,8 @@ name: Alert menu: Components --- -import { Playground, Props } from 'docz' -import { Alert } from './Alert' +import { Playground, Props } from "docz"; +import { Alert } from "./Alert"; # Alert @@ -26,15 +26,3 @@ import { Alert } from './Alert' Some message Some message - -## Use with children as a function - - - {() => { - const message = 'Hello world' - - return ( - {message} - ) - }} - From c13355c51c7b999dbdb436b6eb318d1838af4077 Mon Sep 17 00:00:00 2001 From: rakannimer Date: Sat, 24 Aug 2019 16:42:33 +0300 Subject: [PATCH 6/6] docs(docz-example-flow): add setup instructions --- examples/flow/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 examples/flow/README.md diff --git a/examples/flow/README.md b/examples/flow/README.md new file mode 100644 index 000000000..63914750e --- /dev/null +++ b/examples/flow/README.md @@ -0,0 +1,21 @@ +# Flow Docz example + +## Download + +```sh +curl https://codeload.github.com/pedronauck/docz/tar.gz/master | tar -xz --strip=2 docz-master/examples/flow +mv flow docz-flow-example +cd docz-flow-example +``` + +## Setup + +```sh +yarn # npm i +``` + +## Run + +```sh +yarn dev # npm run dev +```