Skip to content

Commit 2bdc7f5

Browse files
committed
Write some docs
1 parent 4ea66f5 commit 2bdc7f5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/scripts.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ This repo includes a few scripts to pull content from external sources, primaril
44

55
They are all runnable via npm scripts.
66

7+
## Testing the docs of your fork
8+
9+
If you are contributing a change to the main p5.js repo that affects documentation, you will want to preview how your changes will look on the website. To do so, make sure you have committed your changes to a branch of your fork of p5.js.
10+
11+
Then, in the p5.js-website repo, run the following command, using the URL of your fork of p5 before the `#`, and the name of your branch after the `#`:
12+
13+
```sh
14+
npm run custom:dev https://github.com/yourUsername/p5.js.git#yourBranch
15+
```
16+
17+
This will build the reference from your branch and start a development preview of the website. A URL will be logged in the console that you can go to in your browser to test out your changes.
18+
19+
When you're done, you can run this command to reset your changes:
20+
```sh
21+
npm run custom:cleanup
22+
```
23+
724
## After a p5.js release
825

926
To update the content on the p5.js website following a new release of p5.js, you should run all of these commands to pull in the latest content. **Be sure to run the search indices script last as it depends on the results of the other scripts to be accurate.**

0 commit comments

Comments
 (0)