-
Notifications
You must be signed in to change notification settings - Fork 937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building ”modern” tsc #173
Comments
On macosx > curl -OL https://bellard.org/quickjs/quickjs-2021-03-27.tar.xz
> tar xf quickjs-2021-03-27.tar.xz && cd quickjs-2021-03-27
> make
> cd ..
> curl -OL https://globalcdn.nuget.org/packages/microsoft.typescript.msbuild.5.0.3.nupkg
> unzip microsoft.typescript.msbuild.5.0.3.nupkg -d tsc
> cd tsc/tools/tsc
> curl -OL https://github.com/bellard/quickjs/files/11146444/tsc-5.0.3.patch
> patch -p0 < tsc-5.0.3.patch && cd -
> ./quickjs-2021-03-27/qjsc -o tsc/tools/tsc/tsc tsc/tools/tsc/tsc.js
> echo 'console.log("hello");' > 1.ts
> ./tsc/tools/tsc/tsc 1.ts
> cat 1.js
console.log("hello"); |
Thank you 😃 |
We could also add to the returned return {
//...
getWidthOfTerminal() {
const [width, _height] = os.ttyGetWinSize(1);
return width;
},
writeOutputIsTTY() {
return os.isatty(1);
},
// readFile: function (path, _encoding) { ...
} to get the same output color/layout as node Also, readFile: function (path, _encoding) {
const f = std.open(path, "r");
if (!f)return void 0;
const ret = f.readAsString();
f.close();
return ret;
},
writeFile: function (path, data, writeByteOrderMark) {
const f = std.open(path, "w+");
if (!f)
throw new Error(`Unable to write ${path}`);
f.puts(data);
f.close();
}, I'll try to upstream the patch so (at least) the @zeromake is the removal of |
Have anyone compiled a ”modern” version of tsc (typescript compiler) with qjsc? The patch file available in the tar mentioned in the documentation does not ”work” with the ”current” typescript package.
The text was updated successfully, but these errors were encountered: