简体   繁体   English

将node.js模块与atom-shell一起使用

[英]Using node.js modules with atom-shell

I started to have a look at the atom-shell and as documented there is a possibility to access native node modules: https://github.com/atom/electron/blob/master/docs/tutorial/using-native-node-modules.md 我开始看一下atomic-shell,并且据记录,有可能访问本机节点模块: https : //github.com/atom/electron/blob/master/docs/tutorial/using-native-node- modules.md

So is there any possibility to use those node modules from the javascript code which is executed inside the atom shell, for example to execute sql statements. 因此,有可能使用来自在原子外壳内部执行的javascript代码中的那些节点模块,例如执行sql语句。

是的,这就是重点:)正确构建后,就需要本机node.js模块,就像需要基于JavaScript的模块一样。

For anyone having the same question, the remote-object can handle this: 对于任何有相同问题的人,远程对象都可以处理:

https://github.com/atom/electron/blob/master/docs/api/remote.md https://github.com/atom/electron/blob/master/docs/api/remote.md

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM