diff options
-rw-r--r-- | src/ide.js | 2 | ||||
-rw-r--r-- | src/index.js | 7 | ||||
-rw-r--r-- | src/to-javascript.js | 2 |
3 files changed, 7 insertions, 4 deletions
@@ -22,7 +22,7 @@ const dargs = require('./dargs'); | |||
22 | 22 | ||
23 | const compile = require('./compile'); | 23 | const compile = require('./compile'); |
24 | 24 | ||
25 | const PsModuleMap = require('./PsModuleMap'); | 25 | const PsModuleMap = require('./purs-module-map'); |
26 | 26 | ||
27 | function UnknownModuleError() { | 27 | function UnknownModuleError() { |
28 | this.name = 'UnknownModuleError'; | 28 | this.name = 'UnknownModuleError'; |
diff --git a/src/index.js b/src/index.js index f77e5f8..11b06eb 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -72,7 +72,10 @@ module.exports = function purescriptLoader(source, map) { | |||
72 | 72 | ||
73 | const cmd = spawn(pscPackageCommand, pscPackageArgs); | 73 | const cmd = spawn(pscPackageCommand, pscPackageArgs); |
74 | 74 | ||
75 | if (cmd.status !== 0) { | 75 | if (cmd.error) { |
76 | throw new Error(cmd.error); | ||
77 | } | ||
78 | else if (cmd.status !== 0) { | ||
76 | const error = cmd.stdout.toString(); | 79 | const error = cmd.stdout.toString(); |
77 | 80 | ||
78 | throw new Error(error); | 81 | throw new Error(error); |
@@ -140,7 +143,7 @@ module.exports = function purescriptLoader(source, map) { | |||
140 | compilationStarted: false, | 143 | compilationStarted: false, |
141 | compilationFinished: false, | 144 | compilationFinished: false, |
142 | installed: cache.installed, | 145 | installed: cache.installed, |
143 | srcOption: cache.srcOption | 146 | srcOption: [] |
144 | }; | 147 | }; |
145 | }); | 148 | }); |
146 | 149 | ||
diff --git a/src/to-javascript.js b/src/to-javascript.js index d0934d5..b3e3051 100644 --- a/src/to-javascript.js +++ b/src/to-javascript.js | |||
@@ -16,7 +16,7 @@ const debug = debug_('purs-loader'); | |||
16 | 16 | ||
17 | const debugVerbose = debug_('purs-loader:verbose'); | 17 | const debugVerbose = debug_('purs-loader:verbose'); |
18 | 18 | ||
19 | const PsModuleMap = require('./PsModuleMap'); | 19 | const PsModuleMap = require('./purs-module-map'); |
20 | 20 | ||
21 | function updatePsModuleMap(psModule) { | 21 | function updatePsModuleMap(psModule) { |
22 | const options = psModule.options; | 22 | const options = psModule.options; |