server: add docs-server, --docs cli option & Docs action in launcher menu
This commit is contained in:
parent
0d9832144d
commit
fb1212d7e2
8 changed files with 129 additions and 16 deletions
|
|
@ -1,9 +1,23 @@
|
|||
require('source-map-support').install({handleUncaughtExceptions: false})
|
||||
|
||||
var dev = process.argv[0].includes('node_modules'),
|
||||
settings = require('./settings')
|
||||
settings = require('./settings'),
|
||||
docsServer, serverStarted
|
||||
|
||||
|
||||
function openDocs() {
|
||||
|
||||
if (!docsServer) {
|
||||
var DocsServer = require('./docs-server')
|
||||
docsServer = new DocsServer()
|
||||
}
|
||||
|
||||
docsServer.open()
|
||||
|
||||
}
|
||||
|
||||
if (settings.read('docs')) return openDocs()
|
||||
|
||||
var serverStarted
|
||||
|
||||
function nodeMode() {
|
||||
|
||||
|
|
@ -106,7 +120,9 @@ if (settings.cli) {
|
|||
})
|
||||
|
||||
app.on('ready',function(){
|
||||
var doscServer
|
||||
global.settings = settings
|
||||
global.openDocs = openDocs
|
||||
global.midilist = require('./midi').list
|
||||
global.serverProcess = null
|
||||
global.clientWindows = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue