paulirish / caltrainschedule.io

:bullettrain_side: caltrain schedules - offline first :dolphin:

Home Page:https://caltrainschedule.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

caltrainschedule.io

Service worker enabled for offline and add to homescreen excellence.

image

This is a @samccone & @paulirish collab. Also probably other awesome people. #sosage

dev

To update caltrain GTFS data. (gtfs: wiki, class diagram)

# probably want to use rvm because ruby bundles and version compat is hard
rvm

# download latest, reset line endings, prepare data
rake download_data && dos2unix gtfs/*.txt && rake prepare_data

# inline data into the index.html, refresh the timestamp, bump the sw
yarn build

test

yarn test # does both of the below, in order


yarn unit:dl # download the latest times from the online schedule. Adjust the results and save to JSON.
yarn unit # open the app, fetch the JSON files, then assert the schedules are equal clientside.
          # Puppeteer will report if the page says there are failures or not.

Thanks

This is a fork of https://github.com/ranmocy/rCaltrain - he did fantastic work. Thank you.

About

:bullettrain_side: caltrain schedules - offline first :dolphin:

https://caltrainschedule.io

License:MIT License


Languages

Language:HTML 52.5%Language:Ruby 26.0%Language:JavaScript 21.4%