Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/scripts/nbin.js

25 lines
607 B
JavaScript
Raw Normal View History

2019-07-03 02:10:17 +02:00
/* global require, __dirname, process */
const { Binary } = require("@coder/nbin");
const fs = require("fs");
const path = require("path");
const target = process.argv[2];
const arch = process.argv[3];
const source = process.argv[4];
const bin = new Binary({
mainFile: path.join(source, "out/vs/server/main.js"),
target: target,
});
bin.writeFiles(path.join(source, "**"));
bin.build().then((binaryData) => {
const outputPath = path.join(source, "code-server");
fs.writeFileSync(outputPath, binaryData);
fs.chmodSync(outputPath, "755");
}).catch((ex) => {
console.error(ex);
process.exit(1);
});