|
|
|
@ -32,12 +32,13 @@ module.exports = function(content, map, meta) {
@@ -32,12 +32,13 @@ module.exports = function(content, map, meta) {
|
|
|
|
|
if (options.expr) |
|
|
|
|
expr = options.expr; |
|
|
|
|
expr = expr.replace('SXML_LOADER_CONTENT', content); |
|
|
|
|
chdir(this.rootContext); |
|
|
|
|
|
|
|
|
|
const cb = this.async(); |
|
|
|
|
runScheme('guile', ['-c', expr]).then(data => { |
|
|
|
|
cb(null, `${doctype}\n${data}`, map, meta); |
|
|
|
|
}).catch(err => { |
|
|
|
|
console.error(err); |
|
|
|
|
}).catch(code => { |
|
|
|
|
console.error(`Guile exited with code ${code}`); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -49,7 +50,11 @@ function runScheme(interpreter, flags) {
@@ -49,7 +50,11 @@ function runScheme(interpreter, flags) {
|
|
|
|
|
resolve(data); |
|
|
|
|
}); |
|
|
|
|
scheme.stderr.on('data', (data) => { |
|
|
|
|
reject(data.toString()); |
|
|
|
|
console.error(data.toString()); |
|
|
|
|
}); |
|
|
|
|
scheme.on('exit', (code) => { |
|
|
|
|
if (code) |
|
|
|
|
reject(code); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|