-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from UNDP-Data/chore/switch-spritezero-to-spri…
…te-one chore: switched elastic/spritezero to unvt/sprite-one to generate sprite files. Migrate scripts in package.json to Makefile
- Loading branch information
Showing
11 changed files
with
761 additions
and
1,720 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@undp-data/style": minor | ||
--- | ||
|
||
chore: switched elastic/spritezero to unvt/sprite-one to generate sprite files. Migrate scripts in package.json to Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,4 @@ jobs: | |
run: pnpm install --frozen-lockfile | ||
|
||
- name: build style | ||
run: pnpm build | ||
run: make build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
nonSdfFolder = "docs/sprite-non-sdf" | ||
sdfFolder = "docs/sprite" | ||
iconFolder = "assets/maki-icons" | ||
|
||
.PHONY: help clean clean style build-voyager build-aerial sprite voyager aerial | ||
|
||
help: | ||
@echo "Please use \`make <target>' where <target> is one of" | ||
@echo " build to build styles and sprites" | ||
@echo " clean to clean build folder" | ||
@echo " style to build style files" | ||
@echo " build-voyager to build only voyager style" | ||
@echo " build-aerial to build only aerial style" | ||
@echo " sprite to build only sprite" | ||
@echo " voyager to develop voyager style YAML" | ||
@echo " aerial to develop aerial style YAML" | ||
|
||
build: clean style sprite | ||
|
||
clean: | ||
@echo | ||
@echo "------------------------------------------------------------------" | ||
@echo "Cleaning build folder" | ||
@echo "------------------------------------------------------------------" | ||
rm -rf docs | ||
|
||
style: build-voyager build-aerial | ||
|
||
build-voyager: | ||
@echo | ||
@echo "------------------------------------------------------------------" | ||
@echo "Building voyager style" | ||
@echo "------------------------------------------------------------------" | ||
mkdir -p docs | ||
pnpm charites build assets/style.yml docs/style.json | ||
|
||
build-aerial: | ||
@echo | ||
@echo "------------------------------------------------------------------" | ||
@echo "Building aerial style" | ||
@echo "------------------------------------------------------------------" | ||
mkdir -p docs | ||
pnpm charites build assets/aerialstyle.yml docs/aerialstyle.json | ||
|
||
sprite: | ||
@echo | ||
@echo "------------------------------------------------------------------" | ||
@echo "Building sprites" | ||
@echo "------------------------------------------------------------------" | ||
|
||
rm -rf $(nonSdfFolder) | ||
mkdir -p $(nonSdfFolder) | ||
pnpm sprite-one $(nonSdfFolder)/sprite --icon $(iconFolder) --ratio=1 --ratio=2 --ratio=4 | ||
|
||
rm -rf $(sdfFolder) | ||
mkdir -p $(sdfFolder) | ||
pnpm sprite-one $(sdfFolder)/sprite --icon $(iconFolder) --ratio=1 --ratio=2 --ratio=4 --sdf | ||
|
||
voyager: | ||
@echo | ||
@echo "------------------------------------------------------------------" | ||
@echo "Launching a local server to edit Voyager style" | ||
@echo "------------------------------------------------------------------" | ||
pnpm charites serve assets/style.yml --sprite-input $(iconFolder) --sdf | ||
|
||
aerial: | ||
@echo | ||
@echo "------------------------------------------------------------------" | ||
@echo "Launching a local server to edit Aerial style" | ||
@echo "------------------------------------------------------------------" | ||
pnpm charites serve assets/aerialstyle.yml --sprite-input $(iconFolder) --sdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.