Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve codesandbox template package.json
Browse files Browse the repository at this point in the history
slorber committed Jan 20, 2021

Verified

This commit was signed with the committer’s verified signature.
ronnnnn Seiya Kokushi
1 parent 0a5d306 commit 7c4ce62
Showing 13 changed files with 119 additions and 89 deletions.
8 changes: 7 additions & 1 deletion admin/publish.md
Original file line number Diff line number Diff line change
@@ -196,7 +196,13 @@ Now that the release is done, **merge the pull request**.
- Hit the green "Publish release" button
- Profit! 💰

### 8. Notify people about new release (optional but desirable)
### 8. Update example projects (optional but desirable)

After a release, update the examples to keep them in sync with the latest release. This will ensure that CodeSandbox playground is able to use the new version at [new.docusaurus.io](https://new.docusaurus.io).

Create a separate branch/PR and run `yarn examples:generate`

### 9. Notify people about new release (optional but desirable)

After new release, it is cool to notify our users about this in the Discord chat (`docusaurus-users` channel) and write summaries on Twitter using the following templates.

17 changes: 17 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Docusaurus examples

These example projects are generated with the init CLI:

```
npx @docusaurus/init@latest init examples/<templateName> <templateName>`
```

You can run them in CodeSandbox:

- [classic](https://codesandbox.io/s/github/facebook/docusaurus/tree/master/examples/classic)
- [bootstrap](https://codesandbox.io/s/github/facebook/docusaurus/tree/master/examples/bootstrap)
- [facebook](https://codesandbox.io/s/github/facebook/docusaurus/tree/master/examples/facebook)

**Tip**: use the [new.docusaurus.io](https://new.docusaurus.io) shortcut.

**Note**: We update these examples regularly with `yarn examples:generate`
5 changes: 3 additions & 2 deletions examples/bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "examples-bootstrap",
"name": "docusaurus-bootstrap",
"version": "0.0.0",
"private": true,
"scripts": {
@@ -30,5 +30,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"description": "Docusaurus example project (bootstrap template)"
}
2 changes: 1 addition & 1 deletion examples/bootstrap/sandbox.config.json
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@
"hardReloadOnChange": true,
"view": "browser",
"template": "docusaurus"
}
}
43 changes: 19 additions & 24 deletions examples/bootstrap/yarn.lock
Original file line number Diff line number Diff line change
@@ -1465,9 +1465,9 @@
integrity sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA==

"@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6":
version "7.0.6"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==
version "7.0.7"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad"
integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==

"@types/mdast@^3.0.0":
version "3.0.3"
@@ -1482,9 +1482,9 @@
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==

"@types/node@*":
version "14.14.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.21.tgz#d934aacc22424fe9622ebf6857370c052eae464e"
integrity sha512-cHYfKsnwllYhjOzuC5q1VpguABBeecUp24yFluHpn/BQaVxB1CuQ1FSRZCzrPxrkIfWISXV2LbeoBthLWg0+0A==
version "14.14.22"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18"
integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==

"@types/parse-json@^4.0.0":
version "4.0.0"
@@ -2130,9 +2130,9 @@ boolbase@^1.0.0, boolbase@~1.0.0:
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=

bootstrap@^4.4.1:
version "4.5.3"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.5.3.tgz#c6a72b355aaf323920be800246a6e4ef30997fe6"
integrity sha512-o9ppKQioXGqhw8Z7mah6KdTYpNQY//tipnkxppWhPbiSWdD+1raYsnhwEZjkTHYbGee4cVQ0Rx65EhOY/HNLcQ==
version "4.6.0"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.6.0.tgz#97b9f29ac98f98dfa43bf7468262d84392552fd7"
integrity sha512-Io55IuQY3kydzHtbGvQya3H+KorS/M9rSNyfCGCg9WZ4pyT/lCxIlpJgG1GXW/PswzC84Tr2fBYi+7+jFVQQBw==

boxen@^4.2.0:
version "4.2.0"
@@ -3602,9 +3602,9 @@ ejs@^2.6.1:
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==

electron-to-chromium@^1.3.378, electron-to-chromium@^1.3.634:
version "1.3.641"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.641.tgz#03f14efd70a7971eff2efc947b3c1d0f717c82b9"
integrity sha512-b0DLhsHSHESC1I+Nx6n4w4Lr61chMd3m/av1rZQhS2IXTzaS5BMM5N+ldWdMIlni9CITMRM09m8He4+YV/92TA==
version "1.3.642"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.642.tgz#8b884f50296c2ae2a9997f024d0e3e57facc2b94"
integrity sha512-cev+jOrz/Zm1i+Yh334Hed6lQVOkkemk2wRozfMF4MtTR7pxf3r3L5Rbd7uX1zMcEqVJ7alJBnJL7+JffkC6FQ==

elliptic@^6.5.3:
version "6.5.3"
@@ -4186,14 +4186,14 @@ from2@^2.1.0:
readable-stream "^2.0.0"

fs-extra@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc"
integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==
version "9.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"
integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==
dependencies:
at-least-node "^1.0.0"
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^1.0.0"
universalify "^2.0.0"

fs-minipass@^2.0.0:
version "2.1.0"
@@ -7891,9 +7891,9 @@ react@^16.8.4:
prop-types "^15.6.2"

reactstrap@^8.4.1:
version "8.8.1"
resolved "https://registry.yarnpkg.com/reactstrap/-/reactstrap-8.8.1.tgz#181ba837b797994f8d4571497d8a5eb678abfd8a"
integrity sha512-Sv+JdQNrr0J96rUpI19slm21A1T++Xv97mhO5C9gq1bz8qdOQE0fXhF0/HxYcxyUops8Rdmwsli+8iu+yy9N/w==
version "8.9.0"
resolved "https://registry.yarnpkg.com/reactstrap/-/reactstrap-8.9.0.tgz#bca4afa3f5cd18899ef9b33d877a141886d5abae"
integrity sha512-pmf33YjpNZk1IfrjqpWCUMq9hk6GzSnMWBAofTBNIRJQB1zQ0Au2kzv3lPUAFsBYgWEuI9iYa/xKXHaboSiMkQ==
dependencies:
"@babel/runtime" "^7.12.5"
classnames "^2.2.3"
@@ -9349,11 +9349,6 @@ [email protected], unist-util-visit@^2.0.0, unist-util-visit@^2.0.1, unist-
unist-util-is "^4.0.0"
unist-util-visit-parents "^3.0.0"

universalify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==

universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
5 changes: 3 additions & 2 deletions examples/classic/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "examples-classic",
"name": "docusaurus",
"version": "0.0.0",
"private": true,
"scripts": {
@@ -31,5 +31,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"description": "Docusaurus example project"
}
2 changes: 1 addition & 1 deletion examples/classic/sandbox.config.json
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@
"hardReloadOnChange": true,
"view": "browser",
"template": "docusaurus"
}
}
4 changes: 3 additions & 1 deletion examples/classic/src/pages/index.js
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ function Feature({imageUrl, title, description}) {
);
}

export default function Home() {
function Home() {
const context = useDocusaurusContext();
const {siteConfig = {}} = context;
return (
@@ -93,3 +93,5 @@ export default function Home() {
</Layout>
);
}

export default Home;
31 changes: 13 additions & 18 deletions examples/classic/yarn.lock
Original file line number Diff line number Diff line change
@@ -1669,9 +1669,9 @@
integrity sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA==

"@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6":
version "7.0.6"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==
version "7.0.7"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad"
integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==

"@types/mdast@^3.0.0":
version "3.0.3"
@@ -1686,9 +1686,9 @@
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==

"@types/node@*":
version "14.14.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.21.tgz#d934aacc22424fe9622ebf6857370c052eae464e"
integrity sha512-cHYfKsnwllYhjOzuC5q1VpguABBeecUp24yFluHpn/BQaVxB1CuQ1FSRZCzrPxrkIfWISXV2LbeoBthLWg0+0A==
version "14.14.22"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18"
integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==

"@types/parse-json@^4.0.0":
version "4.0.0"
@@ -3874,9 +3874,9 @@ ejs@^2.6.1:
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==

electron-to-chromium@^1.3.378, electron-to-chromium@^1.3.634:
version "1.3.641"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.641.tgz#03f14efd70a7971eff2efc947b3c1d0f717c82b9"
integrity sha512-b0DLhsHSHESC1I+Nx6n4w4Lr61chMd3m/av1rZQhS2IXTzaS5BMM5N+ldWdMIlni9CITMRM09m8He4+YV/92TA==
version "1.3.642"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.642.tgz#8b884f50296c2ae2a9997f024d0e3e57facc2b94"
integrity sha512-cev+jOrz/Zm1i+Yh334Hed6lQVOkkemk2wRozfMF4MtTR7pxf3r3L5Rbd7uX1zMcEqVJ7alJBnJL7+JffkC6FQ==

elliptic@^6.5.3:
version "6.5.3"
@@ -4496,14 +4496,14 @@ from2@^2.1.0:
readable-stream "^2.0.0"

fs-extra@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc"
integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==
version "9.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"
integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==
dependencies:
at-least-node "^1.0.0"
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^1.0.0"
universalify "^2.0.0"

fs-minipass@^2.0.0:
version "2.1.0"
@@ -9737,11 +9737,6 @@ [email protected], unist-util-visit@^2.0.0, unist-util-visit@^2.0.1, unist-
unist-util-is "^4.0.0"
unist-util-visit-parents "^3.0.0"

universalify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==

universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
5 changes: 3 additions & 2 deletions examples/facebook/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "examples-facebook",
"name": "docusaurus-facebook",
"version": "0.0.0",
"private": true,
"scripts": {
@@ -48,5 +48,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"description": "Docusaurus example project (facebook template)"
}
2 changes: 1 addition & 1 deletion examples/facebook/sandbox.config.json
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@
"hardReloadOnChange": true,
"view": "browser",
"template": "docusaurus"
}
}
Loading

0 comments on commit 7c4ce62

Please sign in to comment.