Skip to content

Commit

Permalink
Merge branch 'main' into spooky_graveyard
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeLonewolf authored Oct 6, 2023
2 parents 20eea42 + 9efee5b commit e181b2d
Show file tree
Hide file tree
Showing 30 changed files with 2,050 additions and 1,003 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ jobs:
with:
node-version: 18.16.1 #18.17.0 is buggy
- name: Install and Build 🔧
# TODO: when we move shieldlib to its own repo, move shieldlib docs CI also
run: |
npm ci --include=dev
npm run build
npm run style
npm run shields
cp src/configs/config.aws.js src/config.js
mkdir -p dist/shield-docs
cp -r shieldlib/docs/* dist/shield-docs
- name: Upload Build artifact
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
" > pr_preview.md
- uses: tibdex/github-app-token@v1
id: checks_token
with:
with:
app_id: 396440 #osm-americana checks app
private_key: ${{ secrets.CHECKS_WRITER_SECRET }}
- name: Print Preview Links to GitHub Checks
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ jobs:
with:
node-version: 18.16.1 #18.17.0 is buggy
- name: Install and Build 🔧
# TODO: when we move shieldlib to its own repo, move shieldlib docs CI also
run: |
npm ci --include=dev
cp src/configs/config.aws.js src/config.js
npm run build
npm run style
npm run shields
mkdir -p dist/shield-docs
cp -r shieldlib/docs/* dist/shield-docs
- name: Upload 🏗
uses: actions/upload-pages-artifact@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
# Node v18.17.0, introduced July 18, 2023, introduces an error in unicode processing that breaks test cases on Ubuntu.
# See PR #905 and #908 for more details.
# If this bug is resolved in node, these lines can revert to 18.x rather than 18.16.0.
# Node v18.17.0, introduced July 18, 2023, introduces an error in unicode processing that breaks test cases on Ubuntu.
# See PR #905 and #908 for more details.
# If this bug is resolved in node, these lines can revert to 18.x rather than 18.16.0.
- name: Use Node.js 18.16.1
uses: actions/setup-node@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
# Node v18.17.0, introduced July 18, 2023, introduces an error in unicode processing that breaks test cases on Ubuntu.
# See PR #905 and #908 for more details.
# If this bug is resolved in node, these lines can revert to 18.x rather than 18.16.1.
# Node v18.17.0, introduced July 18, 2023, introduces an error in unicode processing that breaks test cases on Ubuntu.
# See PR #905 and #908 for more details.
# If this bug is resolved in node, these lines can revert to 18.x rather than 18.16.1.
- name: Use Node.js 18.16.1
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ config.js
dist
download
local.config.js
shieldlib/docs
samples/
9 changes: 9 additions & 0 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ The highway shield [color palette](americana.gpl) can be imported into Inkscape
3. Import [americana.gpl](americana.gpl).
4. Restart Inkscape.
5. Click the ◀ button to the right of the color palette strip at the bottom of the window (or in the top-right corner of the Color Palette panel), then choose americana.gpl from the menu.

## Map sample images

Map sample images can be generated with a script. See [sample_locations.json](test/sample_locations.json) for the format.

1. Create a JSON file with the map location and clipping rectangles
2. Start the server in the background with `npm start &`
3. Configure playwright: either `npx playwright install chromium` or `export CHROME_BIN=/usr/bin/chromium`
4. Run the generate_samples script and pass the JSON file location: `npm run generate_samples -- test/sample_locations.json``
146 changes: 142 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@
"shieldlib"
],
"scripts": {
"build:shieldlib": "cd shieldlib && node scripts/build.js",
"build:shieldlib": "cd shieldlib && node scripts/build.js && npm run docs",
"build:code": "exec ts-node scripts/build",
"build": "run-s clean-build sprites build:shieldlib build:code taginfo status_map",
"clean": "run-s clean:shieldlib clean:code clean-download clean-build",
"clean-download": "shx rm -rf download",
"clean-build": "shx rm -rf dist build",
"clean:shieldlib": "cd shieldlib && shx rm -rf dist",
"clean:shieldlib": "cd shieldlib && shx rm -rf dist docs",
"clean:code": "shx rm -rf dist",
"config": "shx cp src/configs/config.maptiler.js src/config.js",
"code_format": "run-s code_format:prettier code_format:svgo",
"code_format:prettier": "prettier --write --list-different .",
"code_format:svgo": "svgo -q -f icons/",
"extract_layer": "node scripts/extract_layer",
"generate_samples": "ts-node scripts/generate_samples.ts",
"presprites": "shx rm -rf dist/sprites",
"serve": "ts-node scripts/serve",
"shields": "node scripts/generate_shield_defs.js -o dist/shields.json",
Expand All @@ -50,6 +51,7 @@
"@basemaps/sprites": "^6.41.0",
"@mapbox/vector-tile": "^1.3.1",
"@maplibre/maplibre-gl-style-spec": "^17.0.1",
"@playwright/test": "^1.38.1",
"@types/chai": "^4.3.4",
"@types/color-namer": "^1.3.0",
"@types/mocha": "^10.0.1",
Expand Down
Loading

0 comments on commit e181b2d

Please sign in to comment.