Make 'publishing components to npm' a sub-part of the deployment doc

This commit is contained in:
Kristofer Selbekk
2018-10-09 06:57:35 +02:00
parent 89087144ac
commit e3f0f4ab45
3 changed files with 7 additions and 11 deletions

View File

@@ -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.

View File

@@ -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.

View File

@@ -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"
]
}