Skip to content

A live reload to map-styles local NPM dev script #1147

Closed

Description

@danrademacher

What's your idea for a cool feature that would help you use OHM better.

A live reload to map-styles local NPM dev script would make style updates easier

Here's the npm start script
https://github.com/OpenHistoricalMap/map-styles/blob/staging/package.json#L9

Current workarounds
Manually reload pages

Activity

  1. erictheise commented on Oct 7, 2025

    @erictheise
    Contributor

    alive-server seems to be the most actively developed node module for browser refresh that doesn't require adding code into our pages. I've not been able to get it working with https connections and have opened an issue with them seeking help.

    If that doesn't pan out I'll look into another alternative.

  2. added 2 commits that reference this issue on Oct 7, 2025
  3. erictheise commented on Oct 7, 2025

    @erictheise
    Contributor

    browsersync seems to do what we need with little fuss. I've swapped it for http-server, modified the npm run start script accordingly, and made a minor update to our README.

    @jeffreyameyer, could you check out the browser-sync branch of map-styles, run npm install, then npm run start, and see if the reload is working for you?

  4. jeffreyameyer commented on Oct 7, 2025

    @jeffreyameyer
    Member

    Works, with 2 comments:

    1. Users have to click through an initial security warning and a second accept this risk on Firefox (possibly a 1x thing)
    2. The web pages never seem to fully load, giving a busy signal blue dot in Firefox
    Image Image
  5. erictheise commented on Oct 8, 2025

    @erictheise
    Contributor
    1. Users have to click through an initial security warning and a second accept this risk on Firefox (possibly a 1x thing)

    This is always going to happen with a self-signed certificate. This one is set up with a 10 year expiration so a user should only have to do it once for a given computer and browser. The alternative would be to use a pair from something like Let's Encrypt which wouldn't throw that warning but would need to be replaced every 90 days.

    1. The web pages never seem to fully load, giving a busy signal blue dot in Firefox

    Chrome exhibits comparable behavior. I tried adding an explicit --host 127.0.0.1 to the invocation but it has no effect (I've seen reports that say using localhost is what causes the busy signal but browser-sync seems to substitute localhost for the ip quad).

  6. added a commit that references this issue on Oct 8, 2025
  7. erictheise commented on Oct 8, 2025

    @erictheise
    Contributor

    Merged into staging and released as v.0.9.11. Since these are dev-only changes there's nothing to verify in production and I'm closing this issues.

  8. moved this to Done in OHM Cartoon Oct 8, 2025
  9. moved this from Tested in staging to Live in production in OHM Cartoon Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

  • Status
    Live in production

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions