From e056b24ec25b65a3c39980fefc022cb0a1dbbc43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Jim=C3=A9nez?= Date: Sat, 10 Sep 2022 21:28:51 +0200 Subject: [PATCH] build(electron-builder): extract build configuration from package.json (#589) --- electron-builder.json | 90 +++++++++++++++++++++++++++++++++++++ package.json | 101 ++---------------------------------------- 2 files changed, 94 insertions(+), 97 deletions(-) create mode 100644 electron-builder.json diff --git a/electron-builder.json b/electron-builder.json new file mode 100644 index 00000000..12d362ff --- /dev/null +++ b/electron-builder.json @@ -0,0 +1,90 @@ +{ + "productName": "Cerebro", + "appId": "com.cerebroapp.Cerebro", + "protocols": { + "name": "Cerebro URLs", + "role": "Viewer", + "schemes": [ + "cerebro" + ] + }, + "directories": { + "app": "./app", + "output": "release" + }, + "linux": { + "target": [ + { + "target": "deb", + "arch": [ + "x64" + ] + }, + { + "target": "AppImage", + "arch": [ + "x64" + ] + } + ], + "category": "Utility" + }, + "mac": { + "category": "public.app-category.productivity" + }, + "dmg": { + "contents": [ + { + "x": 410, + "y": 150, + "type": "link", + "path": "/Applications" + }, + { + "x": 130, + "y": 150, + "type": "file" + } + ] + }, + "win": { + "target": [ + { + "target": "nsis", + "arch": [ + "x64", + "ia32" + ] + } + ] + }, + "nsis": { + "include": "build/installer.nsh", + "perMachine": true + }, + "files": [ + "dist/", + "main/index.html", + "main/css,", + "background/index.html", + "tray_icon.png", + "tray_icon.ico", + "tray_iconTemplate@2x.png", + "node_modules/", + "main.js", + "main.js.map", + "package.json", + "!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples,*.d.ts}", + "!**/node_modules/.bin", + "!**/*.{o,hprof,orig,pyc,pyo,rbc}", + "!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,thumbs.db,.gitignore,.gitattributes,.editorconfig,.flowconfig,.yarn-metadata.json,.idea,appveyor.yml,.travis.yml,circle.yml,npm-debug.log,.nyc_output,yarn.lock,.yarn-integrity}" + ], + "squirrelWindows": { + "iconUrl": "https://raw.githubusercontent.com/cerebroapp/cerebro/master/build/icon.ico" + }, + "publish": { + "provider": "github", + "vPrefixedTagName": true, + "releaseType": "release" + } +} diff --git a/package.json b/package.json index 9a1ee114..49eec9ec 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cerebro", "productName": "cerebro", "version": "0.6.0", - "description": "Cerebro is a open-source launcher to improve your productivity and efficiency", + "description": "Cerebro is an open-source launcher to improve your productivity and efficiency", "main": "main.js", "scripts": { "test": "cross-env NODE_ENV=test jest", @@ -23,109 +23,16 @@ "prepare": "husky install", "commit": "cz" }, - "build": { - "productName": "Cerebro", - "appId": "com.cerebroapp.Cerebro", - "protocols": { - "name": "Cerebro URLs", - "role": "Viewer", - "schemes": [ - "cerebro" - ] - }, - "directories": { - "app": "./app", - "output": "release" - }, - "linux": { - "target": [ - { - "target": "deb", - "arch": [ - "x64" - ] - }, - { - "target": "AppImage", - "arch": [ - "x64" - ] - } - ], - "category": "Utility" - }, - "mac": { - "category": "public.app-category.productivity" - }, - "dmg": { - "contents": [ - { - "x": 410, - "y": 150, - "type": "link", - "path": "/Applications" - }, - { - "x": 130, - "y": 150, - "type": "file" - } - ] - }, - "win": { - "target": [ - { - "target": "nsis", - "arch": [ - "x64", - "ia32" - ] - } - ] - }, - "nsis": { - "include": "build/installer.nsh", - "perMachine": true - }, - "files": [ - "dist/", - "main/index.html", - "main/css,", - "background/index.html", - "tray_icon.png", - "tray_icon.ico", - "tray_iconTemplate@2x.png", - "node_modules/", - "main.js", - "main.js.map", - "package.json", - "!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples,*.d.ts}", - "!**/node_modules/.bin", - "!**/*.{o,hprof,orig,pyc,pyo,rbc}", - "!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,thumbs.db,.gitignore,.gitattributes,.editorconfig,.flowconfig,.yarn-metadata.json,.idea,appveyor.yml,.travis.yml,circle.yml,npm-debug.log,.nyc_output,yarn.lock,.yarn-integrity}" - ], - "squirrelWindows": { - "iconUrl": "https://raw.githubusercontent.com/cerebroapp/cerebro/master/build/icon.ico" - }, - "publish": { - "provider": "github", - "vPrefixedTagName": true, - "releaseType": "release" - } - }, - "bin": { - "electron": "./node_modules/.bin/electron" - }, "repository": { "type": "git", "url": "git+https://github.com/cerebroapp/cerebro.git" }, "author": { - "name": "Alexandr Subbotin", - "email": "kelionweb@gmail.com", - "url": "https://github.com/KELiON" + "name": "CerebroApp Organization", + "url": "https://github.com/cerebroapp" }, "contributors": [ + "Alexandr Subbotin (https://github.com/KELiON)", "Gustavo Pereira", "David Jiménez (https://dubis.dev)" ],