From 60b2398cc51bf0e7647248fc87d54c93b32993ab Mon Sep 17 00:00:00 2001 From: Chris Geirman Date: Fri, 18 Mar 2016 12:14:32 -0700 Subject: [PATCH] add instructions for testing website locally Summary:Explain the **motivation** for making this change. What existing problem does the pull request solve? > When vjeux [asked me how the documentation changes looked](https://github.com/facebook/react-native/pull/6423#issuecomment-195608638), it wasn't obvious to me how to build and view them locally. So, I thought it might be a good idea to add instructions to the contributing document. I was able to run the website locally when working on PR #6423 but am no longer able to now. I have since updated my local repo with a `git pull`. I've deleted the node_modules directories in both the root and website folders, rebuilding both. Still, I get the following error when I run `npm start` within the website directory (problem with the ES2015 compiling?)... ```bash **/react-native/website/server/convert.js:134 .filter(key => key.startsWith('RN_')) ^^ SyntaxError: Unexpected token => at exports.runInThisContext (vm.js:73:16) at Module._compile ( Closes https://github.com/facebook/react-native/pull/6510 Differential Revision: D3070560 Pulled By: vjeux fb-gh-sync-id: 6d200bb545d0ce357500cd666dd400ec82fafa92 shipit-source-id: 6d200bb545d0ce357500cd666dd400ec82fafa92 --- CONTRIBUTING.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ee69e85cea7199..cc5376c9cd0ba9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,11 +19,17 @@ The core team will be monitoring for pull requests. When we get one, we'll run s 1. Fork the repo and create your branch from `master`. 2. **Describe your test plan in your commit.** If you've added code that should be tested, add tests! 3. If you've changed APIs, update the documentation. -4. Add the copyright notice to the top of any new files you've added. -5. Ensure tests pass on Travis and Circle CI. -6. Make sure your code lints (`node linter.js `). -7. Squash your commits (`git rebase -i`). -8. If you haven't already, sign the [CLA](https://code.facebook.com/cla). +4. If you've updated the docs, verify the website locally and submit screenshots if applicable +``` +$ cd website +$ npm install && npm start +go to: http://localhost:8079/react-native/index.html +``` +5. Add the copyright notice to the top of any new files you've added. +6. Ensure tests pass on Travis and Circle CI. +7. Make sure your code lints (`node linter.js `). +8. Squash your commits (`git rebase -i`). +9. If you haven't already, sign the [CLA](https://code.facebook.com/cla). #### Copyright Notice for files