From 00966500190c8af648072c22642e49a1a049173d Mon Sep 17 00:00:00 2001 From: Jeremy Gayed Date: Tue, 17 Oct 2017 14:54:42 -0400 Subject: [PATCH] Contributing (#61) * CONTRIBUTING.md * update scripts * Tweak --- CONTRIBUTING.md | 23 +++++++++++++++++++++++ package.json | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..43be5aa --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,23 @@ +# Contributing + +First, thank you for contributing! 🎉 + +## Local Development + +The local development workflow is fairly straightfowrad: + +1. Fork the repo and then git clone your fork locally (be sure to work on a new branch, not on your `master` branch) +1. `npm install` +1. `npm run test:watch` this will run the tests in watch mode + +## Testing against your own app + +If you'd like to test out a local version of `react-tracking` in an app you're using it in, you can: + +1. Add `react-tracking` to your project (`npm i react-tracking`) +1. `npm install` in your local checkout of react-tracking +1. `npm link` in react-tracking +1. `npm link react-tracking` in the project you want to use it in +1. `npm run build:watch` in react-tracking to run the watcher to get updates as you develop + +Then you'll be pointing at the local checkout of react-tracking to test your changes from within your app. diff --git a/package.json b/package.json index db7c83b..5a14119 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,9 @@ "scripts": { "prepare": "npm run lint && npm run test && npm run build", "build": "babel --out-dir build src --ignore src/__tests__", + "build:watch": "npm run build -- --watch", "test": "jest", + "test:watch": "jest --watch", "lint": "eslint ./src", "precommit": "lint-staged" }