我已经使用Electron构建了一个应用程序。它是一种回归工具,使用Wraith来比较网页的视觉布局,然后吐出一个突出显示差异的图库:https://github.com/BBC-News/wraith
我的电子应用程序在npm start
上可以正常使用,请在下面查看我的package.json
。
该应用程序的功能是它吐出稍后由该应用程序读取的文件,而幽灵吐出那些创建要查看的图库的文件。它会在我应用程序根目录下的文件夹中创建文件。
因为这是一个内部应用程序,所以我正在开发它,因为团队中的每个人都使用MAC,所以只需要在MAC上工作即可。
问题:由于应用程序需要在根目录下写入文件,因此在我尝试使用Electron Builder打包应用程序后,似乎无法正常工作
我没有收到任何控制台错误或其他信息。适当的bash命令似乎根本没有运行。这意味着幽灵不进行比较,也不会生成文件/图库。否则,该应用程序将完全按照我的预期工作。
我怀疑它不起作用,因为幽灵需要输出shots文件夹来生成图库。如果能澄清或确认这一点,我们将不胜感激。
{
"name": "electron-quick-start",
"version": "1.0.0",
"description": "A minimal Electron application",
"main": "main.js",
"scripts": {
"postinstall": "install-app-deps",
"test": "echo \"Error: no test specified\" && exit 1",
"start": "concurrently \"npx babel --watch src --out-dir . --presets react-app/prod\" \"electron .\"",
"pack": "electron-builder --dir",
"dist": "electron-builder"
},
"build": {
"appId": "com.example.app",
"productName": "Testing Packager",
"directories": {
"output": "build"
},
"dmg": {
"contents": [
{
"x": 110,
"y": 150
},
{
"x": 240,
"y": 150,
"type": "link",
"path": "/Applications"
}
]
},
"linux": {
"target": [
"AppImage",
"deb"
]
},
"win": {
"target": "squirrel",
"icon": "build/icon.ico"
}
},
"repository": "https://github.com/electron/electron-quick-start",
"keywords": [
"Electron",
"quick",
"start",
"tutorial",
"demo"
],
"author": "GitHub",
"license": "CC0-1.0",
"devDependencies": {
"concurrently": "^4.1.1",
"electron": "^5.0.6",
"electron-installer-dmg": "^3.0.0",
"electron-installer-zip": "^0.1.2",
"electron-packager": "^14.1.1",
"gulp": "^4.0.2",
"gulp-sass": "^4.0.2",
"gulp-watch": "^5.0.1",
"node-sass": "^4.12.0"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"dependencies": {
"babel-cli": "^6.26.0",
"babel-preset-react-app": "^3.1.2",
"browserify": "^16.3.0",
"easytimer.js": "^4.0.1"
}
}
感谢所有 萌