Skip to content

Commit adf1173

Browse files
authored
Merge pull request #1117 from nbogie/more-custom-dev-doc
document local repo option for custom:dev
2 parents 7de93a6 + 740b263 commit adf1173

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

docs/scripts.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,22 @@ npm run custom:dev https://github.com/yourUsername/p5.js.git#yourBranch
1616

1717
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.
1818

19+
Actually, it's also possible to test against a branch from your _local_ repo. This means you can test without first pushing to github (but you _will_ still need your changes checked into a branch, locally).
20+
21+
To do this, just supply the file-path to the local repo, instead of the url to the repo.
22+
23+
```sh
24+
npm run custom:dev path-to-local-repo#yourBranch
25+
```
26+
27+
For example, if you have a local p5.js clone repo called `p5.js` as a sibling directory to the website, you could run the following:
28+
29+
```sh
30+
npm run custom:dev ../p5.js#yourBranch
31+
```
32+
33+
### Resetting your changes
34+
1935
When you're done, you can run this command to reset your changes:
2036
```sh
2137
npm run custom:cleanup

0 commit comments

Comments
 (0)