Skip to content

Commit 8a0e989

Browse files
authored
Markdown formatting fixes (maplibre#4206)
- Remove duplicate empty lines - these are ignored and rendered as 1 empty line anyway. - Change NPM to npm (its always lower-case) - Add a h1 title to CONTRIBUTING - All headers should be followed by a line break P.S. could consider adding a markdownlint config and/or using Prettier?
1 parent aa435b6 commit 8a0e989

File tree

7 files changed

+21
-15
lines changed

7 files changed

+21
-15
lines changed

ARCHITECTURE.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Parsing and layout
1010

1111
Vector tiles are fetched and parsed on WebWorker threads. "Parsing" a vector tile involves:
12+
1213
- Deserializing source layers, feature properties, and feature geometries from the PBF. This is handled by the [`vector-tile-js`](https://github.com/mapbox/vector-tile-js) library.
1314
- Transforming that data into _render-ready_ data that can be used by WebGL shaders to draw the map. We refer to this process as "layout," and it carried out by `WorkerTile`, the `Bucket` classes, and `ProgramConfiguration`.
1415
- Indexing feature geometries into a `FeatureIndex`, used for spatial queries (e.g. `queryRenderedFeatures`).
@@ -56,10 +57,8 @@ Compiling and caching GL shader programs is managed by the `Painter` and `Progra
5657
- Expanding a `#pragma mapbox` statement in our shader source into either a _uniform_ or _attribute_, _varying_, and _local_ variable declaration, depending on whether or not the relevant style property is data-driven.
5758
- Creating and populating a _paint_ vertex array for data-driven properties, corresponding to the `attributes` declared in the shader. (This happens at layout time, on the worker side.)
5859

59-
6060
## SourceCache
6161

6262
## Transform
6363

6464
## Controls
65-

CONTRIBUTING.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
# Contributing to MapLibre GL JS
2+
13
Hi, and thanks in advance for contributing to MapLibre GL JS. Here's how we work. Please follow these conventions when submitting an issue or pull request.
24

35
## Do not violate Mapbox copyright!
6+
47
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](https://github.com/maplibre/maplibre-gl-js/discussions)!
58

69
## Best Practices for Contributions
@@ -215,6 +218,7 @@ Additionally, if you're using VSCode, the "Format Document" action or "Editor: F
215218
### Version Control Conventions
216219

217220
Here is a recommended way to get setup:
221+
218222
1. Fork this project
219223
2. Clone your new fork, `git clone git@github.com:GithubUser/maplibre-gl-js.git`
220224
3. `cd maplibre-gl-js`

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ Check out the features through [examples](https://maplibre.org/maplibre-gl-js/do
5151

5252
<br />
5353

54-
5554
Want an example? Have a look at the official [MapLibre GL JS Documentation](https://maplibre.org/maplibre-gl-js/docs/examples/).
5655

5756
Use MapLibre GL JS bindings for [React](https://visgl.github.io/react-map-gl/docs/get-started) and [Angular](https://github.com/maplibre/ngx-maplibre-gl). Find more at [awesome-maplibre](https://github.com/maplibre/awesome-maplibre).
@@ -68,7 +67,6 @@ Read the [CONTRIBUTING.md](CONTRIBUTING.md) guide in order to get familiar with
6867
### Avoid Fragmentation
6968

7069
If you depend on a free software alternative to `mapbox-gl-js`, please consider joining our effort! Anyone with a stake in a healthy community-led fork is welcome to help us figure out our next steps. We welcome contributors and leaders! MapLibre GL JS already represents the combined efforts of a few early fork efforts, and we all benefit from "one project" rather than "our way". If you know of other forks, please reach out to them and direct them here.
71-
7270

7371
> **MapLibre GL JS** is developed following [Semantic Versioning (2.0.0)](https://semver.org/spec/v2.0.0.html).
7472

build/readme.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ These commands will use rollup to bundle the code. This is where the magic happe
2121

2222
In the `rollup` folder there are some files that are used as linking files as they link to other files for rollup to pick when bundling.
2323

24-
Rollup is generating 3 files throughout the process of bundling:
24+
Rollup is generating 3 files throughout the process of bundling:
2525

26-
`index.ts` a file containing all the code that will run in the main thread.
26+
`index.ts` a file containing all the code that will run in the main thread.
2727

2828
`shared.ts` a file containing all the code shared between the main and worker code.
2929

@@ -34,14 +34,21 @@ These 3 files are then referenced and used by the `bundle_prelude.js` file. It a
3434
<hr>
3535

3636
### `npm run codegen`
37+
3738
The `codegen` command runs the following three scripts, to update the corresponding code files based on the `v8.json` style source, and other data files. Contributors should run this command manually when the underlying style data is modified. The generated code files are then committed to the repo.
38-
#### generate-struct-arrays.ts
39+
40+
#### generate-struct-arrays.ts
41+
3942
Generates `data/array_types.ts`, which consists of:
43+
4044
- `StructArrayLayout_*` subclasses, one for each underlying memory layout
4145
- Named exports mapping each conceptual array type (e.g., `CircleLayoutArray`) to its corresponding `StructArrayLayout` class
4246
- Specific named `StructArray` subclasses, when type-specific struct accessors are needed (e.g., `CollisionBoxArray`)
43-
#### generate-style-code.ts
47+
48+
#### generate-style-code.ts
49+
4450
Generates the various `style/style_layer/[layer type]_style_layer_properties.ts` code files based on the content of `v8.json`. These files provide the type signatures for the paint and layout properties for each type of style layer.
51+
4552
<hr>
4653

4754
### Generate Release Nodes

developer-guides/release-process.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
## Publish to NPM
1+
# Publish to npm
22

33
1. Review [`CHANGELOG.md`](../CHANGELOG.md)
44
- Double-check that all changes included in the release are [appropriately documented](../CONTRIBUTING.md#changelog-conventions).
55
- To-be-released changes should be under the "main" header.
66
- Commit any final changes to the changelog.
77
2. Run [Create bump version PR](https://github.com/maplibre/maplibre-gl-js/actions/workflows/create-bump-version-pr.yml) by manual workflow dispatch and set the version number in the input. This will create a PR that changes the changelog and `package.json` file to review and merge.
8-
3. Once merged, an automatic process will kick in and creates a GitHub release, uploads release assets, and publishes the build output to NPM.
8+
3. Once merged, an automatic process will kick in and creates a GitHub release, uploads release assets, and publishes the build output to npm.
99

10-
The workflow expects `${{ secrets.NPM_ORG_TOKEN }}` organization secret in order to push to NPM registry.
10+
The workflow expects `${{ secrets.NPM_ORG_TOKEN }}` organization secret in order to push to npm registry.

docs/guides/mapbox-migration-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ MapLibre GL JS v1 is completely backward compatible with Mapbox GL JS v1. This c
3131
- rel="stylesheet"
3232
- />
3333

34-
34+
3535
+ <script src="https://unpkg.com/maplibre-gl@#.#.#/dist/maplibre-gl.js"></script>
3636
+ <link
3737
+ href="https://unpkg.com/maplibre-gl@#.#.#/dist/maplibre-gl.css"

docs/index.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
MapLibre GL JS is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The customization of the map comply with the [MapLibre Style Spec](https://maplibre.org/maplibre-style-spec). It is part of the [MapLibre ecosystem](https://github.com/maplibre), with a pendant for Mobile, Desktop, Servers called [MapLibre Native](https://maplibre.org/projects/maplibre-native/).
44

5-
65
## Quickstart
76

87
<iframe src="./examples/simple-map.html" width="100%" style="border:none"></iframe>
@@ -49,7 +48,6 @@ img-src data: blob: ;
4948

5049
For strict CSP environments without `worker-src blob: ; child-src blob:` enabled, there's a separate MapLibre GL JS bundle (`maplibre-gl-csp.js` and `maplibre-gl-csp-worker.js`) which requires setting the path to the worker manually:
5150

52-
5351
```html
5452
<script>
5553
maplibregl.setWorkerUrl("${urls.js().replace('.js', '-csp-worker.js')}");
@@ -70,7 +68,7 @@ Note too that if the CSS isn't available by the first render, as soon as the CSS
7068
The MapLibre GL JS (`.js` & `.css`) are distributed via [UNPKG.com](https://unpkg.com).
7169
You can view a listing of all the files in the MapLibre GL JS package by appending a `/` at the end of the MapLibre slug. This is useful to review other revisions or to review the files at UNPKG or the LICENSE. See examples in the following table:
7270

73-
*Examples*
71+
### Examples
7472

7573
| Use Case | `.js` | `.css` |
7674
| :------- | :---: | :----: |

0 commit comments

Comments
 (0)