Admin: Info for testing Docusaurus with Docusaurus (#116)

This commit is contained in:
Joel Marcey 2017-10-06 10:36:19 -07:00 committed by GitHub
parent 77535d80f2
commit 5e4ee88153
2 changed files with 24 additions and 2 deletions

View file

@ -1,6 +1,8 @@
Sometimes you want to test the latest version of Docusaurus via `npm` or `yarn` without having to publish it to npm itself. For example, you may want to use the latest code in `master`.
Sometimes you want to test the latest version of Docusaurus on a third-party project via `npm` or `yarn` without having to publish it to npm itself. For example, you may want to use the latest code in `master`.
There are a couple of ways to use a local version of an npm package.
> If you want to use Docusaurus to test Docusuarus, see the [testing changins on Docusaurus itself doc](./testing-changes-on-Docusaurus-itself.md)
There are two reasonable ways to use a local version of the Docusaurus npm package to test changes you make to the Docusaurus core on a third-party project.
## Install from a local Docusaurus repo

View file

@ -0,0 +1,20 @@
If you are developing the Docusuarus core and you want a quick way to test your changes, you can use the Docusaurus website itself as your testing area.
> For tips on testing other projects, see the [local testing of third-party projects doc](./local-third-party-project-testing.md).
## Testing
It is straightforward to test your Docusaurus changes with Docusaurus.
```
cd /path/to/docusaurus-repo
npm install
cd website
npm run start
```
If you look in the `website/package.json` file, you will notice that running `start` with `npm run` actually loads the local `start-server.js` file. This is how you know you are running with local code.
### Observing changes
Now that the server is running, you can make changes to the core Docusaurus code and docs to see the effects on the Docusaurus site. Just refresh the local site, usually running at http://localhost:3000