aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PscIde.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/PscIde.js')
-rw-r--r--src/PscIde.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/PscIde.js b/src/PscIde.js
index 2e105be..27b49f6 100644
--- a/src/PscIde.js
+++ b/src/PscIde.js
@@ -156,11 +156,17 @@ function rebuild(psModule) {
156 .then(resolve) 156 .then(resolve)
157 .catch(() => resolve(psModule)) 157 .catch(() => resolve(psModule))
158 } 158 }
159 cache.errors = compileMessages.join('\n') 159 const errorMessage = compileMessages.join('\n');
160 if (errorMessage.length) {
161 psModule.emitError(errorMessage);
162 }
160 resolve(psModule); 163 resolve(psModule);
161 } else { 164 } else {
162 cache.warnings = compileMessages.join('\n') 165 const warningMessage = compileMessages.join('\n');
163 resolve(psModule) 166 if (options.warnings && warningMessage.length) {
167 psModule.emitWarning(warningMessage);
168 }
169 resolve(psModule);
164 } 170 }
165 }) 171 })
166 }) 172 })