-
Notifications
You must be signed in to change notification settings - Fork 762
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
Native electron support #371
base: master
Are you sure you want to change the base?
Conversation
Currently I don't know how to execute native nodejs |
I tested this and it works like a charm. |
I'm just copy FileProxy.js from browser platform and implement all functions via native node. There was not truncate, but it is not problem to add it. |
Tested but not working; i have removed last cordova-plugin-file and added https://github.com/zorn-v/cordova-plugin-file.git#electron |
You doing something wrong. |
I'm using cordova
Source: src/electron/FileProxy.js:35 so it's this line:
I've checked the result of Is this happening because I'm using a wrong cordova or cordova-electron version? |
Seems in electron 10 |
Try to reinstall plugin and check again |
Now I can't fetch the plugin anymore:
Same |
I've figured out that fetch was failing because I've upgraded nodejs to |
I update deps (cordova to 10 and cordova-electron to 2) in https://github.com/zorn-v/cordova-electron-file-test for test and all works fine. |
Yeah, the test does work! Thank you and happy holidays! ;) |
Any update on this? |
I think never. Just use my branch |
I have the same problem. How can i fix that @zorn-v ? |
Just as I said before #371 (comment) |
Hi, I'm getting with electron config:
Tried #371 (comment) and Any ideas? platform: linux |
Maybe config reads from another place, maybe electron does not accept disabled node integration (I doubt) any more. |
not too familiar with cordova or electron, the config seems to be the correct one thou. width and height do work. |
electron/electron#23506 |
Might try and follow this PR as a reference to update your PR. Or create a new PR that is dedicated to the Cordova-Electron 3.0 support. Might be better to separate so if there is anyone who wants to continue to fork your current file pr for the older releases of Cordova-Electron. apache/cordova-plugin-device#135 In your PR, I noticed it enforced users to use For a side question, why not use https://nodejs.libhunt.com/compare-rimraf-vs-node-fs-extra
Anyways, with the Cordova plugin support in Cordova-Electron 3.0, you can now make an npm package that will be installed during the plugin install. You can set dependencies to the subpackage. We no longer need to commit the third-party libraries into the repo, which is something we try to avoid. It uses context isolation as well. |
Is some sense in it ? My PR here already about 2 years without merge ) |
PR looks great - does anyone have a guess when this may be merged? |
Platforms affected
Electron
Motivation and Context
Use native nodejs functions for filesystem instead of writing files to chrome IndexedDB of electron app.
Closes #334 #312
Testing
https://github.com/zorn-v/cordova-electron-file-test
Checklist