Skip to content

Latest commit

 

History

History
83 lines (62 loc) · 2.71 KB

CONTRIBUTING.md

File metadata and controls

83 lines (62 loc) · 2.71 KB

How to Contribute

Where to start?

Commit guidelines

This project follows the Conventional Commits specification.

Commit messages should be structured as follows:

<type>[optional scope]: <description>
docs: add user story

Repo structure

The Esmbly project uses a monorepo approach. This makes it easier to make (and test) changes across packages. All packages are located in the packages directory.

|-- packages
    |-- cli .................... Command line interface
    |-- core ................... Core functionality (Generate AST, Run transformers)
    |-- printer ................ Responsible for printing to the console
    |-- transformer-v8 ......... V8 transformer
    |-- transformer-flow ....... Flow transformer
    |-- transformer-jsdoc ...... JSDoc transformer
    |-- transformer-wasm ....... WebAssembly transformer
    |-- types .................. Shared type definitions
    |-- utils .................. Shared utilities

Contribution process

Overview

  1. Fork this project.
  2. Installing your local dev environment
  3. Create a feature branch.
  4. Make your changes.
  5. Run the tests.
  6. Push your changes to your fork/branch.
  7. Open a pull request.

1. Fork

  1. Click the fork button up top.
  2. Clone your fork locally (Notice that git's origin reference will point to your forked repository).
  3. It is useful to have the upstream repository registered as well using: git remote add upstream https://github.com/esmbly/esmbly.git and periodically fetch it using git fetch upstream.

2. Installing your local dev environment

Prerequisites

  • Node.js >= v.10
  • Yarn
yarn install

3. Create a feature branch

Create and switch to a new feature branch: git checkout -b {branch_name} upstream/master
(replace {branch_name} with a meaningful name that describes your feature or change).

4. Make your changes

Now that you have a new branch you can edit/create/delete files.

5. Run the tests

  • Run tests: yarn test.
  • Run lint: yarn lint.
  • Run e2e tests: yarn test-e2e.

6. Push your changes to your fork/branch

After lint and all tests pass, push the changes to your fork/branch on GitHub: git push origin {branch_name}.

7. Create a pull request

Create a pull request on GitHub for your feature branch.