From 6ab1eca04a11dc5d8f725b3aa8515d94b6819e4b Mon Sep 17 00:00:00 2001 From: Michal Kozakiewicz Date: Fri, 6 Jan 2017 17:18:59 +0100 Subject: Add psc-ide-server arguments and pass src to psc-ide-server --- README.md | 1 + src/PscIde.js | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9d6166b..e4f0bf0 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ Default options: pscBundleArgs: {}, pscIde: false, // instant rebuilds using psc-ide-server (experimental) pscIdeArgs: {}, // for example, to use different psc-ide-server port: {port: 4088} + pscIdeServerArgs: {}, // for example, to change the port { port: 4088 } pscIdeColors: false, // defaults to true if psc === 'psa' bundleOutput: 'output/bundle.js', bundleNamespace: 'PS', diff --git a/src/PscIde.js b/src/PscIde.js index 27b49f6..8a0e823 100644 --- a/src/PscIde.js +++ b/src/PscIde.js @@ -61,13 +61,14 @@ function connect(psModule) { ideClient.stdin.write('\n') }) - const args = dargs(Object.assign({ + const serverArgs = dargs(Object.assign({ outputDirectory: options.output, - }, options.pscIdeArgs)) + "_": options.src + }, options.pscIdeServerArgs)) - debug('attempting to start psc-ide-server', args) + debug('attempting to start psc-ide-server', serverArgs) - const ideServer = cache.ideServer = spawn('psc-ide-server', []) + const ideServer = cache.ideServer = spawn('psc-ide-server', serverArgs) ideServer.stderr.on('data', data => { debug(data.toString()) }) -- cgit v1.2.3