Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

929 shift to npm approach map styles #32

Merged
merged 26 commits into from
Mar 12, 2025
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f8633c4
rename rail to railway for consistency with rails app.
erictheise Feb 5, 2025
11b62c3
rename rail to railway for consistency with rails app.
erictheise Feb 5, 2025
ae677fa
rename main to original for consistency and to prevent git conflicts …
erictheise Feb 5, 2025
23ca979
rename original to historical for consistency with rails app.
erictheise Feb 5, 2025
6c1a520
rename original to historical for consistency with rails app.
erictheise Feb 5, 2025
fa2ea2b
rename japanese_scroll components for consistency with rails app.
erictheise Feb 5, 2025
d86b042
add node things
erictheise Feb 5, 2025
f71b0f2
add dist directory
erictheise Feb 5, 2025
af23c73
Re: https://github.com/OpenHistoricalMap/issues/issues/929, adds a pr…
erictheise Feb 5, 2025
70cf44f
Create LICENSE
erictheise Feb 5, 2025
d2df749
Update and rename LICENSE to LICENSE.md
erictheise Feb 6, 2025
63dfbba
Re: https://github.com/OpenHistoricalMap/issues/issues/929, adds corr…
erictheise Feb 7, 2025
c66814b
Interim commit
erictheise Feb 10, 2025
6c52cad
Re: https://github.com/OpenHistoricalMap/issues/issues/929, copy upda…
erictheise Feb 10, 2025
c2dd6b0
Re: https://github.com/OpenHistoricalMap/issues/issues/929, replace o…
erictheise Feb 10, 2025
9a645bd
Re: https://github.com/OpenHistoricalMap/issues/issues/929, more name…
erictheise Feb 10, 2025
c199f5b
Merge branch '929-shift-to-npm-approach-map-styles' into express
erictheise Feb 10, 2025
650ad2e
Re: https://github.com/OpenHistoricalMap/issues/issues/929, glyph & s…
erictheise Feb 13, 2025
cb5b753
Typo
erictheise Feb 25, 2025
99aa398
Add section on running locally
erictheise Feb 25, 2025
07d941f
Correct sprite urls
erictheise Mar 11, 2025
22a0bb7
Applying recent style changes from staging
erictheise Mar 11, 2025
d8fe85d
Version bump
erictheise Mar 11, 2025
20d3d2f
Merge staging, conform documentation markdown files
erictheise Mar 11, 2025
65e7bc1
Improve README with latest info as changed in this PR
danrademacher Mar 12, 2025
54c5384
Update dist and package-lock
erictheise Mar 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Correct sprite urls
  • Loading branch information
erictheise committed Mar 11, 2025
commit 07d941f129464c0365ea126e10ee63ac5fed8365
6 changes: 3 additions & 3 deletions dist/ohm.styles.js
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ ohmVectorStyles = {
]
}
},
"sprite": "https://www.openhistoricalmap.org/map-styles/main/main_spritesheet",
"sprite": "https://www.openhistoricalmap.org/map-styles/historical/historical_spritesheet",
"glyphs": "https://www.openhistoricalmap.org/map-styles/fonts/{fontstack}/{range}.pbf",
"layers": [
{
@@ -12237,7 +12237,7 @@ ohmVectorStyles = {
]
}
},
"sprite": "https://www.openhistoricalmap.org/map-styles/japanese_scroll/jp_spritesheet_template",
"sprite": "https://www.openhistoricalmap.org/map-styles/japanese_scroll/japanese_scroll_spritesheet_template",
"glyphs": "https://www.openhistoricalmap.org/map-styles/fonts/{fontstack}/{range}.pbf",
"layers": [
{
@@ -16300,7 +16300,7 @@ ohmVectorStyles = {
]
}
},
"sprite": "https://www.openhistoricalmap.org/map-styles/rail/rail_spritesheet",
"sprite": "https://www.openhistoricalmap.org/map-styles/railway/railway_spritesheet",
"glyphs": "https://www.openhistoricalmap.org/map-styles/fonts/{fontstack}/{range}.pbf",
"layers": [
{
2 changes: 1 addition & 1 deletion japanese_scroll/japanese_scroll.json
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
]
}
},
"sprite": "http://localhost:8888/japanese_scroll/jp_spritesheet_template",
"sprite": "http://localhost:8888/japanese_scroll/japanese_scroll_spritesheet_template",
"glyphs": "http://localhost:8888/fonts/{fontstack}/{range}.pbf",
"layers": [
{
2 changes: 1 addition & 1 deletion railway/railway.json
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
]
}
},
"sprite": "http://localhost:8888/rail/rail_spritesheet",
"sprite": "http://localhost:8888/railway/railway_spritesheet",
"glyphs": "http://localhost:8888/fonts/{fontstack}/{range}.pbf",
"layers": [
{
9 changes: 8 additions & 1 deletion scripts/prepare.js
Original file line number Diff line number Diff line change
@@ -18,8 +18,15 @@ if (!fs.existsSync(distDir)) {
}

try {
const assets = ['glyphs', 'sprite'];
styles.forEach((style) => {
ohmVectorStyles[camelCase(style, { pascalCase: true })] = JSON.parse(fs.readFileSync(path.join(baseDir.path, style, `${style}.json`)));
// Load each development style from disk, replace the scheme/domain/port, & make it the value of an ohm-website key,
// e.g., japanese_scroll => ohmVectorStyles.JapaneseScroll
const ohmWebsiteKey = camelCase(style, { pascalCase: true });
ohmVectorStyles[ohmWebsiteKey] = JSON.parse(fs.readFileSync(path.join(baseDir.path, style, `${style}.json`)));
assets.forEach((asset) => {
ohmVectorStyles[ohmWebsiteKey][asset] = ohmVectorStyles[ohmWebsiteKey][asset].replace('http://localhost:8888', 'https://www.openhistoricalmap.org/map-styles')
})
})
fs.writeFileSync(
path.join(distDir, `ohm.styles.js`),