Commit 4790f049 authored by antoor's avatar antoor

Optimal configuration loading scheme

优化配置加载方案
parent 20748590
......@@ -5,9 +5,7 @@
'use strict';
// 读取package.json信息
const info = JSON.parse(
require('fs').readFileSync(require('path').join(__dirname, '../package.json'))
);
const info = require('../package');
class Menubar {
......
......@@ -2,13 +2,11 @@
// 程序入口
// -------
// create: 2015/12/20
// update: 2016/01/20
// update: 2016/04/02
//
'use strict';
const fs = global.require('fs');
const path = global.require('path');
const electron = global.require('electron');
const remote = electron.remote;
const ipcRenderer = electron.ipcRenderer;
......@@ -59,7 +57,7 @@ ipcRenderer.send('aproxy', {
antSword['ipcRenderer'] = ipcRenderer;
antSword['CacheManager'] = CacheManager;
antSword['menubar'] = new Menubar();
antSword['package'] = JSON.parse(fs.readFileSync(path.join(global.__dirname, '../package.json')));
antSword['package'] = global.require('../package'));
// 加载模块列表
// antSword['tabbar'] = new dhtmlXTabBar(document.getElementById('container'));
......
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