mozilla / oghliner

template and tool for deploying Offline Web Apps to GitHub Pages
https://mozilla.github.io/oghliner/
Apache License 2.0
116 stars 17 forks source link

oghliner offline ./dist/ doesn't strip dist/ from paths of offlined files #280

Open mykmelez opened 8 years ago

mykmelez commented 8 years ago

@digitarald's chromatic-tuner-web-app uses the Oghliner CLI to offline the app by calling oghliner offline ./dist/:

https://github.com/digitarald/chromatic-tuner-web-app/blob/0db453a7883e44abea10a1aff0f7d71f5dfccbbb/package.json#L10

Calling oghliner offline ./dist/ should strip the dist/ prefix from the paths of the files that it lists in the dist/offline-worker.js file, but it doesn't. Calling oghliner offline dist/, however, correctly strips that prefix.

Perhaps we need to normalize the root dir before using it to strip the prefix?