From e3f0f4ab459c626399b4e17d231ea0f8019df769 Mon Sep 17 00:00:00 2001 From: Kristofer Selbekk Date: Tue, 9 Oct 2018 06:57:35 +0200 Subject: [PATCH] Make 'publishing components to npm' a sub-part of the deployment doc --- docusaurus/docs/deployment.md | 3 +++ docusaurus/docs/publishing-components-to-npm.md | 7 ------- docusaurus/website/sidebars.json | 8 ++++---- 3 files changed, 7 insertions(+), 11 deletions(-) delete mode 100644 docusaurus/docs/publishing-components-to-npm.md diff --git a/docusaurus/docs/deployment.md b/docusaurus/docs/deployment.md index 4c42844e..6260c995 100644 --- a/docusaurus/docs/deployment.md +++ b/docusaurus/docs/deployment.md @@ -456,3 +456,6 @@ When asked about the project path, make sure to specify the `build` folder, for Note that in order to support routers that use HTML5 `pushState` API, you may want to rename the `index.html` in your build folder to `200.html` before deploying to Surge. This [ensures that every URL falls back to that file](https://surge.sh/help/adding-a-200-page-for-client-side-routing). +## Publishing Components To npm + +Create React App doesn't provide any built-in functionality to publish a component to npm. If you're ready to extract a component from your project so other people can use it, we recommend moving it to a separate directory outside of your project and then using a tool like [nwb](https://github.com/insin/nwb#react-components-and-libraries) to prepare it for publishing. diff --git a/docusaurus/docs/publishing-components-to-npm.md b/docusaurus/docs/publishing-components-to-npm.md deleted file mode 100644 index af01ec1e..00000000 --- a/docusaurus/docs/publishing-components-to-npm.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -id: publishing-components-to-npm -title: Publishing Components To npm -sidebar_label: Publishing To npm ---- - -Create React App doesn't provide any built-in functionality to publish a component to npm. If you're ready to extract a component from your project so other people can use it, we recommend moving it to a separate directory outside of your project and then using a tool like [nwb](https://github.com/insin/nwb#react-components-and-libraries) to prepare it for publishing. diff --git a/docusaurus/website/sidebars.json b/docusaurus/website/sidebars.json index d21dfac3..bd79060e 100644 --- a/docusaurus/website/sidebars.json +++ b/docusaurus/website/sidebars.json @@ -4,8 +4,8 @@ "documentation-intro" ], "Getting Started": [ - "getting-started", - "folder-structure", + "getting-started", + "folder-structure", "available-scripts", "supported-browsers-features", "updating-to-new-releases" @@ -43,7 +43,7 @@ "title-and-meta-tags" ], "Testing": ["running-tests", "debugging-tests"], - "Deployment": ["publishing-components-to-npm", "deployment"], + "Deployment": ["deployment"], "Advanced Usage": [ "can-i-use-decorators", "pre-rendering-into-static-html-files", @@ -51,7 +51,7 @@ "alternatives-to-ejecting" ], "Support": [ - "troubleshooting", + "troubleshooting", "sending-feedback" ] }