标签:
1.先用 git 下载一个 react-devtools:
$ cd /some-directory
$ git clone --recursive https://github.com/facebook/react-devtools.git
拷贝至:xxx\resources\app\src\browser\
2.找到 keymaps>win32.json:
‘body‘:
‘f12‘: ‘window:toggle-dev-tools‘
3. require(‘remote‘).require(‘browser-window‘).addDevToolsExtension(‘/some-directory/react-devtools‘)
/* 注 */
xxx\resources\atom\browser\lib\chrome-extension.js ->
manifest = JSON.parse(fs.readFileSync(path.join(srcDirectory + ‘/../‘, ‘manifest.json‘)));
//manifest = JSON.parse(fs.readFileSync(path.join(srcDirectory, ‘manifest.json‘)));
xxx\resources\app\src\browser\atom-application.js
this.devToolsExtensionsPath = __dirname + ‘/devtools-extensions‘;
标签:
原文地址:http://www.cnblogs.com/linr/p/4535880.html