sindresorhus / electron-serve

Static file serving for Electron apps
MIT License
437 stars 34 forks source link

Fix Electron 5 compatibility #10

Closed dedo1911 closed 5 years ago

dedo1911 commented 5 years ago

As specified on Electron repo at protocol.md the method registerStandardSchemes is no longer available on Electron 5.x.

This change checks if that method exists so won't break compatibility with < 5.x

dedo1911 commented 5 years ago

Will fix tests and push it again :)

sindresorhus commented 5 years ago

No need to close the PR. Just push additional commits if something needs to be fixed.

sindresorhus commented 5 years ago

I would prefer to just switch to the Electron 5 API completely. I don't have time to supports multiple versions of Electron.

dedo1911 commented 5 years ago

I'm already using this one in a live project and works fine on both 4.x and 5.x

dedo1911 commented 5 years ago

That should be all I got in my local working version :)

I will get that right... Too much used with StandardJS 🙄

hacdias commented 5 years ago

@sindresorhus @dedo1911 any updates on this? 😄

dedo1911 commented 5 years ago

@hacdias I've pushed all I had to. Waiting for @sindresorhus to merge now