-
Notifications
You must be signed in to change notification settings - Fork 761
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
feat(electron): add platform support #549
base: master
Are you sure you want to change the base?
Conversation
chore(electron): various edits & refactors
The Android & iOS tests can be ignored because there are existing issues present that is causing them to fail, and that's been happening to some time. We know it's not caused by this PR. Lint test should pass, which it currently does.
Obviously it will be nice to have actual unit tests, but I won't personally reject a PR without unit tests. It can always be added later. |
I'm sorry. The test project has been created. Will add unit tests soon |
@breautek added functionality and added electron stuff to tests where missing. Also fixed eslint. |
When will this be committed? |
Making chnages to make this compatible to |
Updated files to accept new single array args
Platforms affected
Electron
Motivation and Context
This is required so that cordova electron can have a working file plugin
fixes #334
fixes #312
fixes #477
closes #371
closes #387
Description
The base implementation has two things.1. Scripts to add and remove node implementations done in filescdv-electron-main.js
andcdv-electron-preload.js
. Since the scripts look for comments, and remove code between the comments on plugin remove, we should be good as long as the dev doesn't mess those up. These scripts are added to support Context Isloation that has been encouraged in electron@^3.0. Thefs
required can be called fromwindow.cordovaFilePlugin.function
. I had to tweak some changes because the return value objects have their methods removed.With the help of Erisu, I was able to update the code so that it doesn't require extra scripts. The electron implementation uses the
framework
keyword and uses backend node-js functions to implement stuff.Testing
I've tested them on my personal projects. Will write an exclusive test project if necessary,
Also, https://github.com/pjoriginal/cordova-file-test
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)