diff options
author | Michal Kozakiewicz <morswin@gmail.com> | 2017-01-06 17:18:59 +0100 |
---|---|---|
committer | Michal Kozakiewicz <morswin@gmail.com> | 2017-01-06 17:26:35 +0100 |
commit | 6ab1eca04a11dc5d8f725b3aa8515d94b6819e4b (patch) | |
tree | e75d77dd4686e6238fc9c9726474013686b2b36d | |
parent | 5f4d6751efdb215207e7ee87b424b14c4dc041d1 (diff) | |
download | purs-loader-6ab1eca04a11dc5d8f725b3aa8515d94b6819e4b.tar.gz purs-loader-6ab1eca04a11dc5d8f725b3aa8515d94b6819e4b.tar.zst purs-loader-6ab1eca04a11dc5d8f725b3aa8515d94b6819e4b.zip |
Add psc-ide-server arguments and pass src to psc-ide-server
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | src/PscIde.js | 9 |
2 files changed, 6 insertions, 4 deletions
@@ -54,6 +54,7 @@ Default options: | |||
54 | pscBundleArgs: {}, | 54 | pscBundleArgs: {}, |
55 | pscIde: false, // instant rebuilds using psc-ide-server (experimental) | 55 | pscIde: false, // instant rebuilds using psc-ide-server (experimental) |
56 | pscIdeArgs: {}, // for example, to use different psc-ide-server port: {port: 4088} | 56 | pscIdeArgs: {}, // for example, to use different psc-ide-server port: {port: 4088} |
57 | pscIdeServerArgs: {}, // for example, to change the port { port: 4088 } | ||
57 | pscIdeColors: false, // defaults to true if psc === 'psa' | 58 | pscIdeColors: false, // defaults to true if psc === 'psa' |
58 | bundleOutput: 'output/bundle.js', | 59 | bundleOutput: 'output/bundle.js', |
59 | bundleNamespace: 'PS', | 60 | 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) { | |||
61 | ideClient.stdin.write('\n') | 61 | ideClient.stdin.write('\n') |
62 | }) | 62 | }) |
63 | 63 | ||
64 | const args = dargs(Object.assign({ | 64 | const serverArgs = dargs(Object.assign({ |
65 | outputDirectory: options.output, | 65 | outputDirectory: options.output, |
66 | }, options.pscIdeArgs)) | 66 | "_": options.src |
67 | }, options.pscIdeServerArgs)) | ||
67 | 68 | ||
68 | debug('attempting to start psc-ide-server', args) | 69 | debug('attempting to start psc-ide-server', serverArgs) |
69 | 70 | ||
70 | const ideServer = cache.ideServer = spawn('psc-ide-server', []) | 71 | const ideServer = cache.ideServer = spawn('psc-ide-server', serverArgs) |
71 | ideServer.stderr.on('data', data => { | 72 | ideServer.stderr.on('data', data => { |
72 | debug(data.toString()) | 73 | debug(data.toString()) |
73 | }) | 74 | }) |