Skip to content

Latest commit

 

History

History
83 lines (51 loc) · 3.28 KB

CONTRIBUTING.md

File metadata and controls

83 lines (51 loc) · 3.28 KB

Mission

To scale UI development linearly by prioritising on component design in isolation.

At the core is the assumption that complexity in large apps stems from hidden links between parts. Tedious as it can be to uncover each and every component dependency, committing to it promises predictability and long term sanity.

Moreover, React Cosmos tries to answer the question: How to design components that are truly reusable?

For more context see manifesto and problem analysis written back in 2014, before code was written.

Design

The Best Code is No Code At All. Start with this in mind before writing code.

React Cosmos is a monorepo with many small packages. This makes it possible to design isolated units, but also to build and test all packages together (inside one of the examples).

Progress

Projects are used to track large releases. Issues are used for everything else.

Issue labels

Issues are first categorised as one of the following:

  • hmm Questions and support
  • oops Bugs
  • i have a dream Ideas and feature proposals

Once a draft progresses, it will go through the following phases:

  • needs love Accepted ideas without a clear implementation plan
  • free for all Detailed issues that can be picked up by anyone
  • on it Work in progress

How to contribute

A great way to start is by picking up a free for all issue.

Be kind and thoughtful

Most of us are doing this for free, so be realistic and don't expect special treatment. The better we communicate the more likely we'll end up collaborating.

Ask for review

Code review aside, also ask for review before implementing solution. Saves everybody time and effort.

Get familiar with codebase

git clone [email protected]:react-cosmos/react-cosmos.git
cd react-cosmos

# Install deps and link child packages (using Lerna)
npm install

# Optional: build everything using older React versions
npm run install-react:0.13

# Build example from source and test React Cosmos holistically
cd examples/flatris
npm install
npm start

# Watch & build single package (running example will live reload)
npm run build react-component-playground -- --watch

# Watch & run unit tests as you code
npm run test-jest -- --watch

Write tests, preferably before implementation

Use Jest for unit testing. Here are some examples:

Older packages are tested with Mocha and Karma, but those tests are considered legacy.

Keep coding style consistent

Make sure npm run lint passes and add xo to your editor if possible.

Use Git conscientiously

Nothing fancy, just the usual the GitHub flow.