Skip to content

Latest commit

 

History

History
95 lines (76 loc) · 2.69 KB

CONTRIBUTING.md

File metadata and controls

95 lines (76 loc) · 2.69 KB

How to Contribute

Prerequisites

  • Node.js (LTS recommended) installed.
  • Git installed.

Get started

Fork Github repository https://github.com/dayoneteams/react-flowstate.

Clone codebase.

git clone <fork-repo-url>

Add root remote to keep code up-to-date.

git remote add root [email protected]:dayoneteams/react-flowstate.git

Create new branch to work on.

git checkout -b <branch name, e.g: feature/abc, fix/cde>

Create PR from your forked branch to main branch of root remote. Rebase code first to get all new updated code (resolve conflicts if any).

git pull root main --rebase

Go to https://github.com/dayoneteams/react-flowstate/compare and create new PR.

Bundling library and run test app server with live code update

Start build process in watch mode.

npm install
npm start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

Open another terminal window and run the test app.

npm run app

# Or to build and run test app on production mode
npm run app:prod

Check the test app on http://localhost:3000

Start documentation website

npm run doc

Check the test app on http://localhost:5000/react-flowstate/

Automation Test

npm run test

Code style

Check lint issues.

npm run lint

Auto-fix lint issues. Do this before committing code.

npm run lint:fix

Build

Running the build task will output into /dist multiple module formats (CJS & ESM by default, and also UMD if you want) plus development and production builds.

npm run build

CodeSandbox Examples

CodeSandbox examples are stored inside examples folder. To create new example (highly welcomed), just duplicate the examples/basic into another folder name and start working on it. To test the examples/basic right on local devices.

cd examples/basic
npm i
npx parcel serve index.html

Check example code at http://localhost:1234

Bundle analysis

Calculates the real cost of your library using size-limit with npm run size and visulize it with npm run analyze.

Semantic Versioning

React-Flowstate follows Semantic Versioning. We release patch versions for critical bugfixes, minor versions for new features or non-essential changes, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance. Learn more about our commitment to stability and incremental migration in our versioning policy.

Every significant change is documented in the changelog file.