contributing.md - improved #Local previews section (#1645)

* contributing.md - improved #Local previews section

* contributing.md - added the 'npm run bootstrap' step
This commit is contained in:
Evgenia Karunus 2019-06-11 22:34:33 +05:00 committed by Artur Paikin
parent 6bcf2040e9
commit 2c2987ecb4
2 changed files with 16 additions and 36 deletions

View file

@ -122,28 +122,18 @@ Even though bundled in this repo, the website is regarded as a separate project.
### Local previews
It is recommended to exclude `./website/public/` from your editor if you want efficient searches.
To install the required node modules, type:
```bash
npm install && cd website && npm install && cd ..
```
For local previews on http://localhost:4000, type:
```bash
npm run web:start # that gets you just the website. if you need companion, etc. you can use `npm start` instead
```
This will watch the website, as well as Uppy, as the examples, and rebuild everything and refresh your browser as files change.
1. `npm install`
2. `npm run bootstrap`
3. `cd website && npm install && cd ..`
4. `npm start`
5. Go to http://localhost:4000. Your changes in `/website` and `/packages/@uppy` will be watched, your browser will refresh as files change.
Then, to work on, for instance, the XHRUpload example, you would edit the following files:
```bash
${EDITOR} src/core/Core.js \
src/plugins/XHRUpload.js \
src/plugins/Plugin.js \
${EDITOR} packages/@uppy/core/src/index.js \
packages/@uppy/core/src/Plugin.js \
packages/@uppy/xhr-upload/src/index.js \
website/src/examples/xhrupload/app.es6
```