Skip to content

Latest commit

 

History

History
101 lines (67 loc) · 4.3 KB

CONTRIBUTING.md

File metadata and controls

101 lines (67 loc) · 4.3 KB

Contributing to ColorSandbox

This guide was basically copy and pasted from the beloved people at CodeSandbox

Table of Contents

Code of Conduct

We have a code of conduct you can find here and every contributor is expected to obey the rules therein. Any issues or PRs that don't abide by the code of conduct may be closed.

Setting Up the project locally

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub

To install the project you need to have yarn and node

  1. Fork the project, clone your fork:

    # Clone your fork
    git clone https://github.com/<your-username>/colorsandbox.git
    
    # Navigate to the newly cloned directory
    cd colorsandbox
    
  2. yarn to install dependencies

  3. yarn start to start the app

    • this builds the dependencies and runs the app development environment, available on http://localhost:3000
    • on subsequent runs you can also bypass dependencies building and use yarn start:fast

Tip: Keep your master branch pointing at the original repository and make pull requests from branches on your fork. To do this, run:

git remote add upstream https://github.com/fivenp/colorsandbox.git
git fetch upstream
git branch --set-upstream-to=upstream/master master

This will add the original repository as a "remote" called "upstream," then fetch the git information from that remote, then set your local master branch to use the upstream master branch whenever you run git pull. Then you can make all of your pull request branches based on this master branch. Whenever you want to update your version of master, do a regular git pull.

Submitting a Pull Request

Please go through existing issues and pull requests to check if somebody else is already working on it, we use WIP label to mark such issues.

Also, make sure to run the tests and lint the code before you commit your changes.

yarn test
yarn lint

Thank you for taking the time to contribute! 👍

Available scripts in your local environment

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.