land/userland/compile.js

12 lines
300 B
JavaScript

const compileWalt = require('walt-compiler').default;
const fs = require('fs');
fs.readFile(process.argv[2], 'utf8', function (err,data) {
if (err) {
return console.log(err);
}
const buffer = compileWalt(data);
fs.writeFileSync(process.argv[3], new Uint8Array(buffer));
});