Commit 4057053b authored by antoor's avatar antoor

Add `package.json` to Config

把`package`信息添加到配置中
parent b03366fe
...@@ -42,6 +42,14 @@ class Conf { ...@@ -42,6 +42,14 @@ class Conf {
return _; return _;
} }
/**
* 获取package.json配置信息
* @return {Object} [description]
*/
get package() {
return require('../package.json');
}
} }
module.exports = new Conf(); module.exports = new Conf();
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
'use strict'; 'use strict';
const CONF = require('./config');
class Menubar { class Menubar {
constructor(electron, app, mainWindow) { constructor(electron, app, mainWindow) {
...@@ -100,7 +102,8 @@ class Menubar { ...@@ -100,7 +102,8 @@ class Menubar {
} }
]; ];
// 调试菜单 // 调试菜单
if (process.env['npm_package_debug']) { // if (process.env['npm_package_debug']) {
if (CONF['package']['debug']) {
template.push({ template.push({
label: LANG['debug']['title'], label: LANG['debug']['title'],
submenu: [ submenu: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment