[英]Can I update a module on end user's machine without npm or node?
I'm developing an electron application and a module and an electron application uses a module that I made. 我正在开发电子应用程序和模块,而电子应用程序使用我制作的模块。 but I really want to update a module on end user's machine when the target module has new version even if their machine hasn't installed NPM or node environment.
但我真的想在目标用户使用新版本的目标用户的计算机上更新模块,即使他们的计算机尚未安装 NPM或节点环境。
In conclusion, my question is: Can I update a module for an electron application on end user's machine even if NPM or Node environment hasn't installed on their computer? 总之,我的问题是:即使未在计算机上安装 NPM或Node环境, 也可以在最终用户的计算机上为电子应用程序更新模块吗?
Update: The module that I want to update is node.js addon and the binary is published and installed on end user's machine by node-pre-gyp, I can't use any of CDN because it's addon. 更新:我要更新的模块是node.js插件 ,二进制文件通过node-pre-gyp发布并安装在最终用户的计算机上,我不能使用任何CDN,因为它是插件。
Here's a quick solution : you can keep the module file (.js minified/uglified) in a remote cdn and then access that file at client's end. 这是一个快速的解决方案:您可以将模块文件(最小化/最小化.js)保存在远程CDN中,然后在客户端访问该文件。 Whenever you want to update , you can just replace the file.
每当您想要更新时,都可以替换文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.