mirror of
https://github.com/desktop/desktop
synced 2024-08-24 18:57:33 +00:00
resolve json modules
This commit is contained in:
parent
03c154c463
commit
a0489be563
|
@ -1,20 +1,19 @@
|
|||
const appPackage: Record<string, string> = require('./package.json')
|
||||
import { bundleID, companyName, productName, version } from './package.json'
|
||||
|
||||
export function getProductName() {
|
||||
const productName = appPackage.productName
|
||||
return process.env.NODE_ENV === 'development'
|
||||
? `${productName}-dev`
|
||||
: productName
|
||||
}
|
||||
|
||||
export function getCompanyName() {
|
||||
return appPackage.companyName
|
||||
return companyName
|
||||
}
|
||||
|
||||
export function getVersion() {
|
||||
return appPackage.version
|
||||
return version
|
||||
}
|
||||
|
||||
export function getBundleID() {
|
||||
return appPackage.bundleID
|
||||
return bundleID
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"resolveJsonModule": true,
|
||||
"importHelpers": true,
|
||||
"target": "es2017",
|
||||
"allowUnreachableCode": false,
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"moduleResolution": "node",
|
||||
"target": "es2017",
|
||||
"esModuleInterop": true,
|
||||
"resolveJsonModule": true,
|
||||
"importHelpers": true,
|
||||
"allowUnreachableCode": false,
|
||||
"allowUnusedLabels": false,
|
||||
|
|
Loading…
Reference in a new issue