mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-03-29 00:18:13 +08:00
Make 'publishing components to npm' a sub-part of the deployment doc
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user