Skip to content

Latest commit

 

History

History
90 lines (55 loc) · 3.49 KB

CONTRIBUTING.md

File metadata and controls

90 lines (55 loc) · 3.49 KB

Contributing

We are open to and grateful for, any contributions made by the community. By contributing to effector, you agree to abide by the code of conduct.

Reporting Issues and Asking Questions

Before opening an issue, please search the issue tracker to make sure your issue hasn't already been reported.

Development

Visit the Issue tracker to find a list of open issues that need attention.

Fork, then clone the repo:

git clone https://github.com/your-username/effector.git

Another way is to use gitpod:

https://gitpod.io/#https://github.com/effector/effector

Structure

  • docs is a directory with .md files to build effector.dev
  • src contains all source files of effector, effector-react, ...
  • packages contains all files required to publish npm-packages
  • tasks is a directory with scripts to build npm-packages
  • website contains source files of effector.dev

yarn build

This command uses ./tasks to generate package.json for each npm-package from ./packages and build sources. Rollup builds source files to ./npm directory.

README.md

To update Table of Contents use this command:

npx doctoc README.md

Tests

Just use yarn test and yarn test:watch.

Type tests

yarn test --testPathPattern='types' to run types tests, yarn test --testPathPattern='types' -u to update their inline snapshots. Public types are always placed in packages/<library name>/*.d.ts, for example, here are public typings for effector

Type tests are placed in src/types/__tests__/<package-name>/*.test.ts

To add new type test, put that code to any file with type tests:

test('test name', () => {
  // any code here

  expect(typecheck).toMatchInlineSnapshot()
})

and run type tests. Inline snapshot will be filled with type errors (if any) for given code for typescript.

New Features

Please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept.

Before opening a feature request, please read the exists ideas discussions to make sure your feature hasn't already requested.

Publishing

Change version in packages.config.js, run yarn build and commit changes to master branch

Submitting Changes

  • Open a new issue in the Issue tracker.
  • Fork the repo.
  • Create a new feature branch based on the master branch.
  • Make sure all tests pass and there are no linting errors.
  • Please, write a good commit message, explaining why not how.
  • Submit a pull request, referencing any issues it addresses.

Please try to keep your pull request focused in scope and avoid including unrelated commits.

After you have submitted your pull request, we'll try to get back to you as soon as possible. We may suggest some changes or improvements.

Thank you for contributing!