Carve out custom field of package.json to info.json

This commit is contained in:
kPherox 2019-04-07 23:21:26 +09:00
parent d9eefb7df2
commit 079e237b27
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
4 changed files with 12 additions and 7 deletions

5
info.json Normal file
View File

@ -0,0 +1,5 @@
{
"appId": "dev.kpherox.thedesk-vue",
"copyright": "Copyright © 2018 TheDesk",
"documentURL": "https://github.com/kPherox/TheDesk-Vue#readme"
}

View File

@ -50,9 +50,6 @@
"vue-cli-plugin-electron-builder": "^1.2.0",
"vue-template-compiler": "^2.5.21"
},
"dev_kpherox": {
"document": "https://github.com/kPherox/TheDesk-Vue#readme"
},
"eslintConfig": {
"root": true,
"env": {

View File

@ -13,7 +13,8 @@ import {
createProtocol,
installVueDevtools
} from 'vue-cli-plugin-electron-builder/lib'
import PackageJson from "../package.json"
import { bugs } from '../package.json'
import thedeskInfo from '../info.json'
const isDevelopment = process.env.NODE_ENV !== 'production'
@ -141,11 +142,11 @@ const template = [
submenu: [
{
label: 'Report an issue',
click () { shell.openExternal(`${PackageJson.bugs.url}/new`) }
click: () => shell.openExternal(`${bugs.url}/new`),
},
{
label: 'Learn More',
click () { shell.openExternal(PackageJson.dev_kpherox.document) }
click: () => shell.openExternal(thedeskInfo.documentURL),
}
]
}

View File

@ -1,5 +1,6 @@
const { productName } = require("./package.json")
const { appId, copyright } = require("./info.json")
module.exports = {
pages: {
@ -22,7 +23,8 @@ module.exports = {
pluginOptions: {
electronBuilder: {
builderOptions: {
appId: "dev.kpherox.thedesk-vue",
appId: appId,
copyright: copyright,
win: {
"target": [
"nsis",