mapillary-js/.github/CONTRIBUTING.md
Oscar Lorentzon 2eed0b3c9f chore: specify published files
Move types to dependencies for clarity.
Add advisory engines field.
2021-03-27 13:59:56 +01:00

3.8 KiB
Raw Blame History

Thanks in advance for contributing to MapillaryJS. Please follow the conventions below when submitting an issue or pull request.

Code of Conduct

Facebook has adopted the Contributor Covenant as its Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated.

Contribution Prerequisites

  • You have Node installed at v14.16.0+ and Yarn at v1.2.0+.
  • You are familiar with Git.

Sending a Pull Request

We will review your pull request and either merge it, request changes to it, or close it with an explanation. Well do our best to provide updates and feedback throughout the process.

Before submitting a pull request, please make sure the following is done:

  1. Fork the repository and create your branch from main.
  2. Run yarn install in the repository root.
  3. If youve fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (yarn test).
  5. Make sure your code lints (yarn lint).
  6. If you havent already, complete the CLA.

Contributor License Agreement (CLA)

In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if youve done this for another Facebook open source project, youre good to go. If you are submitting a pull request for the first time, just let us know that you have completed the CLA and we can cross-check with your GitHub username.

Complete your CLA here.

Develop with Docker

  1. Install Docker.
  2. Clone the repository.
  3. Build the mapillary-js image:
docker build -t mapillary-js .
  1. Create a mapillary-js container and run it interactively:
docker run -v "$(pwd)":/source/mapillary-js -p 8000:8000 --name mapillary-js-container -it mapillary-js

  1. Stop, start, and attach to the container.

Development Workflow

After cloning MapillaryJS, run yarn to fetch its dependencies. Then, you can run several commands:

  • yarn lint checks the code style.
  • yarn test runs the complete test suite.
  • yarn test-watch runs an interactive test watcher.
  • yarn build creates a dist folder with the package.
  • yarn build-docs builds the documentation in the docs/build folder.

We recommend running yarn test to make sure you dont introduce any regressions as you work on your change.

The easiest way to try your changes is to run yarn start and open the debug page at http://localhost:3000.

However it can be handy to try your build of MapillaryJS in a real project. First, run yarn build. This will produce pre-built bundles in the dist folder.

If you want to try your changes in your existing project, you may copy dist/mapillary.js, dist/mapillary.js.map, and dist/mapillary.min.css into your app and use them instead of the stable version.

Commit conventions

We use the standardized commit messages according to Conventional Commits with the additional types in the Angular convention.

Version Control Conventions

We use rebase merging (as opposed to basic merging) to merge branches.

License

By contributing to MapillaryJS, you agree that your contributions will be licensed under its MIT license.