Comments (4)
Скорее всего дело в поле node-integration
конструктора BrowserWindow.
lib/util.js использует глобальные переменные, только если нет module.exports
Вот пример Cloud Commander в Electron (который раньше назывался Atom Shell
).
from cloudcmd.
Если нужен включенный node-integration
, можно подключить preload таким образом:
mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: __dirname + '/preload.js'
}
});
В preload.js
удалить переменные связанные с module
, module.exports
(согласно документации electron:
window.nodeRequire = require;
delete window.require;
delete window.exports;
delete window.module;
либо подключить все используемые модули, через require
и сохранить их в global scope
:
require('module').globalPaths.push(__dirname + '/node_modules');
try {
window.exec = require('execon');
window.Util = require('cloudcmd/lib/util');
window.CloudFunc = require('cloudcmd/lib/cloudfunc');
window.input = require('cloudcmd/lib/client/input');
[
'rendy',
'smalltalk'
].forEach((name) => {
window[name] = require(`cloudcmd/modules/${name}`);
});
window.rendy = require('cloudcmd/modules/rendy');
window.smalltalk = require('cloudcmd/modules/smalltalk');
window.$ = window.jQuery = require('cloudcmd/modules/jquery/dist/jquery.min');
window.join = require('join-io/www/join');
window.load = require('console-io/modules/load/load');
window.skipfirst = require('console-io/modules/skipfirst/lib/skipfirst');
[
'edward',
'dword',
'spero',
'remedy',
'ishtar'
].forEach((name) => {
window[name] = require(`${name}/lib/client`);
});
} catch(error) {
alert(error);
}
from cloudcmd.
I would love to try cloud commander as a substitution of total commander, is there a separate project that can install an electron version of cloud commander? If not, Is it documented somewhere how to do it manually?
(you can answer in Russian or Ukrainian if you wish. I speak those languages)
from cloudcmd.
@zkochan no there is no such project, but you can use https://github.com/cloudcmd/electron as starting point.
from cloudcmd.
Related Issues (20)
- not able to edit file HOT 2
- feat: a row at the top with Bookmarks/shortcuts to different folder locations HOT 3
- Docker: Could not do a head request for "coderaiser/cloudcmd:latest-alpine" HOT 4
- Large number of files missing or deleted by aborting in the middle of a move file process HOT 5
- feat: Hook upon upload/download HOT 10
- DOMException: Failed to register a ServiceWorker for scope -- when using self signed certificates on Chrome HOT 4
- using AWS Cloudfront, the login authentication can not pass. HTTP 401 HOT 4
- Update docker/build-push-action
- enoent error HOT 24
- Copy recursive preserving permissions HOT 4
- --packer "zip" don't work HOT 9
- Files get deleted on aborting move HOT 6
- Horizontal screen split option HOT 2
- No such image: coderaiser/cloudcmd:latest HOT 3
- [feature request] disable specified items of context menu HOT 6
- "Alpine" image is debian based HOT 9
- Question session/auth timeout HOT 2
- Provide alternate image registry to dockerhub HOT 2
- terminal will leave zombie processes HOT 4
- move between drives dont get followed by moving to destination. HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudcmd.