Browse Source

Chicken Scheme SXML loader

pull/1/head
Ivan Polyakov 2 years ago
parent
commit
e51433556c
  1. 16
      src/loader.js

16
src/loader.js

@ -1,3 +1,15 @@
module.exports = function(content) { const { spawn } = require('child_process');
return content;
module.exports = function(content, map, meta) {
const cb = this.async();
const expr = `(import sxml-serializer)(display (serialize-sxml ${content}))`;
const scheme = spawn('chicken-csi', ['-e', expr]);
scheme.stdout.on('data', data => {
cb(null, data, map, meta);
});
scheme.stderr.on('data', data => {
console.error(data);
});
} }

Loading…
Cancel
Save