Hi, and thanks in advance for contributing to the MapLibre Style Spec. Here's how we work. Please follow these conventions when submitting an issue or pull request.
In December 2020 Mapbox decided to publish future versions of mapbox-gl-js under a proprietary license. You are not allowed to backport code from Mapbox projects which has been contributed under this new license. Unauthorized backports are the biggest threat to the MapLibre project. If you are unsure about this issue, please ask!
MapLibre welcomes contributions from community! Following these best practices will assist the maintainer team in reviewing your contribution. In general, the project values discussion and communication over process and documentation. Below are some best practices that have aided contributors.
It is a good idea to discuss proposed changes before proceeding to an issue ticket or PR. The project team is active in the following forums:
- For informal chat discussions, visit the project's Slack Channel.
- For discussions whose output and outcomes should not be ephemeral, consider starting a thread on GitHub Discussions. This makes it easier to find and reference the discussion in the future.
MapLibre software relies heavily on automated testing, and the project includes a suite of unit and integration tests. For both new features and bug fixes, contributions should update or add test cases to prevent regressions.
The MapLibre style spec documentation site is based on SolidStart in order to get Server Side Rendering for Search Engine Optimization.
cd docs
npm ci
npm run dev
This package is used by maplibre-gl
in order to validate the spec and parse it.
It also has some other tools as can be read in the main README file.
npm install
npm run build
Tests are using Jest. There are a few layers of tests - integration, unit and build tests.
npm run test-unit
npm run test-integration
npm run test-build
In intergration tests, if there's a need to update the expected results you'll need to run the tests with the UPDATE=1
environment flag.
For example UPDATE=1 npm run test-integration
, or if you would like to update only a specific type of integration test use UPDATE=1 npx jest ./test/integration/style-spec/validate_spec.test.ts
In order to publish the package to NPM:
- Go to "Action" in GitHub
- Run the create bump version PR action to create a PR with the version bump
- Approve and merge this PR after you have reviewed the Changelog file
- Squash and merge the PR, an automatic action will pick up the change and publish the package to npm