angular - 如何用 Electron 外部化文件夹?

标签 angular electron electron-builder

我正在使用angular-electron使用 Angular 7 和 Electron 4 构建 Windows 桌面应用程序。现在我想在解压构建的根目录中外部化一个特定的文件夹(假设是 config 文件夹)。应用程序中使用的 config 文件夹内有很多文件,可以由最终用户编辑

这是我想要的解压结构:

screen

如何管理这个?

最佳答案

build 部分下的 electron-builder.json 中添加

"asarUnpack": [
      ... your files or folders
    ]

文档:https://www.electron.build/configuration/configuration#configuration-asarUnpack

之后,您的文件/文件夹将位于 resources\asarUnpack 文件夹中。

关于angular - 如何用 Electron 外部化文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56382018/

相关文章:

javascript - 如何使用 Angular 将动态搜索框放在表格上?

angular - "ng-reflect-*"属性在 Angular2/4 中有什么作用?

angular - Angular2中LocationStrategy实例化时出错

linux - 如何在 ubuntu 14.04 操作系统中安装 electron?

electron - 带有Next.js的 Electron 应用程序(无法加载html文件)

reactjs - 由于路径原因, Electron 构建器无法用于生产

javascript - 从 PrimeNG 覆盖 'MultiSelect' 组件中的函数

google-chrome-devtools - 如何访问 Electron 应用程序当前的浏览器窗口?

javascript - 如何在 Electron 上添加Flash游戏

node.js - Electron 构建器未将我的 dist/node_modules 目录复制到正确的位置