Skip to content

Commit

Permalink
Merge pull request #139 from pathmapper/spreet
Browse files Browse the repository at this point in the history
Use spreet instead of spritezero
  • Loading branch information
pathmapper authored May 30, 2024
2 parents ec25822 + 767168e commit 88a58b0
Show file tree
Hide file tree
Showing 8 changed files with 226 additions and 7,074 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ Save the downloaded SVGs from Maki Editor to the folder [svgs_iconset](https://g
3. Mandatory if the updated `iconset.json` should become part of this repo: Format the JSON with `cat iconset.json | jq -MS '.'` for better legibility.
4. There are also SVGs in the folder [svgs_not_in_iconset](https://github.com/maputnik/osm-liberty/tree/gh-pages/svgs/svgs_not_in_iconset).
These are the SVGs for road shields, the dot used for city and town layers and the road area pattern which could not be modified using the Maki Editor. To modify these you could use e.g. [Inkscape](https://inkscape.org).
5. Install the NPM dev dependencies: `npm install` to have [spritezero-cli](https://gitlab.com/beyondtracks/spritezero-cli) available (we're using a fork of https://github.com/mapbox/spritezero-cli ).
6. Generate the low and high resolution sprites: `npm run build_sprites`
5. Generate the low and high resolution sprites: `npm run build_sprites`

## Have a look at ...

Expand Down
10 changes: 5 additions & 5 deletions build_sprites.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

mkdir temp
cp -a ./svgs/svgs_not_in_iconset/. ./temp/
cp -a ./svgs/svgs_iconset/. ./temp/
./node_modules/.bin/spritezero ./sprites/osm-liberty ./temp/
./node_modules/.bin/spritezero --retina ./sprites/osm-liberty@2x ./temp/
mkdir -p ./temp
wget -P ./temp https://github.com/flother/spreet/releases/download/v0.11.0/spreet-x86_64-unknown-linux-musl.tar.gz
tar -xzvf ./temp/spreet-x86_64-unknown-linux-musl.tar.gz -C ./temp
./temp/spreet --unique --minify-index-file --recursive ./svgs ./sprites/osm-liberty
./temp/spreet --unique --minify-index-file --recursive --retina ./svgs ./sprites/osm-liberty@2x
rm -r temp
Loading

0 comments on commit 88a58b0

Please sign in to comment.