Skip to content

Commit

Permalink
Merge pull request #14 from digitalfabrik/add-formatter
Browse files Browse the repository at this point in the history
add prettier & run format
  • Loading branch information
sarahsporck committed Jun 26, 2023
2 parents ed73afb + 48e62c9 commit 11562a6
Show file tree
Hide file tree
Showing 11 changed files with 600 additions and 2,843 deletions.
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,34 @@ jobs:
steps:
- checkout
- run:
name: "Pull Submodules"
name: 'Pull Submodules'
command: |
git submodule init
git submodule update
- run:
name: "Install Dependencies"
name: 'Install Dependencies'
command: npm install
- run:
name: "Setup Artifacts Folder"
name: 'Setup Artifacts Folder'
command: |
mkdir ~/working
- run:
name: "Copy Glyphs"
name: 'Copy Glyphs'
command: |
cp -r ./font-glyphs/* ~/working/
- run:
name: "Generate sprites"
name: 'Generate sprites'
command: |
./tools/generate_sprite_sheets
- run:
name: "Add Files"
name: 'Add Files'
command: |
cp sprites*.json ~/working/
cp sprites*.png ~/working/
cp style.json ~/working/
cp map.html ~/working/
- run:
name: "Packing Artifact"
name: 'Packing Artifact'
command: |
mkdir ~/artifacts
cd ~/working
Expand All @@ -67,9 +67,9 @@ jobs:
at: ~/artifacts
- add_ssh_keys:
fingerprints:
- "01:24:9a:b8:00:9d:c2:da:57:96:87:8a:3e:d5:54:e8"
- '01:24:9a:b8:00:9d:c2:da:57:96:87:8a:3e:d5:54:e8'
- run:
name: "SSH Upload"
name: 'SSH Upload'
command: |
sudo ssh-keyscan -H maps.tuerantuer.org >> known_hosts
scp -o UserKnownHostsFile=known_hosts ~/artifacts/styles.tar.gz [email protected]:/var/www/styles/integreat-styles.tar.gz
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@ name: CI

on:
push:
branches: [ gh-pages ]
branches: [gh-pages]
pull_request:
branches: [ gh-pages ]
branches: [gh-pages]

jobs:
test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run validate
- run: npm run diff
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run validate
- run: npm run diff
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
svg

style.json
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"arrowParens": "avoid",
"bracketSameLine": true,
"endOfLine": "auto",
"printWidth": 120,
"semi": false,
"singleQuote": true
}
9 changes: 5 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
The Mapbox GL Style JSON file is originally derived from [OSM Bright from Mapbox Open Styles](https://github.com/mapbox/mapbox-gl-styles/blob/master/LICENSE.md). The modified Mapbox GL Style JSON retains the same BSD license.

> Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
> are permitted provided that the following conditions are met:
> * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Mapbox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
> - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Mapbox nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ You can use the style in your Mapbox GL maps.

By default, the vector tiles, raster tiles and sprites directly and glyphs are served from [Tür an Tür](https://maps.tuerantuer.org).


They were created using [OpenMapTiles](https://github.com/openmaptiles/openmaptiles).


## Data Sources

- [OpenMapTiles](http://openmaptiles.org/) as vector data source
Expand Down Expand Up @@ -47,10 +45,13 @@ chmod +x maputnik
A pre-commit hook is included to validate and format the JSON styles using
[`mapbox-gl-style-spec`](https://www.npmjs.com/package/@mapbox/mapbox-gl-style-spec).
To use, just install the NPM dev dependencies:

```
npm install
```

and then validate or format the style with

```
npm run validate
npm run format
Expand All @@ -71,21 +72,21 @@ Liberty's iconset. You can run the script with `python3 maki_list.py`.

**Color Palette**

Color Name | Hex Value
-------------|----------
Blue | `#5d60be`
Light Blue | `#4898ff`
Orange | `#d97200`
Red | `#ba3827`
Brown | `#725a50`
Green | `#76a723`
| Color Name | Hex Value |
| ---------- | --------- |
| Blue | `#5d60be` |
| Light Blue | `#4898ff` |
| Orange | `#d97200` |
| Red | `#ba3827` |
| Brown | `#725a50` |
| Green | `#76a723` |

**Modify Icons for POI Categories**

1. Take the `iconset.json` and import it to the [Maki Editor](https://www.mapbox.com/maki-icons/editor/).
2. Download filled icon from figma or material icon from google.
3. Resize icon to 40x40 [SVG Editor](https://editor.method.ac/).
4. Upload icon in all color groups. Keep in mind the naming convention of the icons: <name>_<hex>
4. Upload icon in all color groups. Keep in mind the naming convention of the icons: <name>\_<hex>
5. Download the icons in SVG format and the iconset in JSON format.
6. Sort the json file alphabetically for better legibility [JSON ABC Sorter]https://novicelab.org/jsonabc/.
7. Update the content of the `iconset.json`.
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
title: OSM Liberty
email: [email protected]
description: A free Mapbox GL basemap based on open data
baseurl: ""
baseurl: ''
markdown: kramdown
Loading

0 comments on commit 11562a6

Please sign in to comment.