Open Honya2000 opened 3 years ago
I'm quite confused how to build low_js folder using duktape runtime. There is tool dukc, which compiles lib_js folder to lib .low files.
But the problem is ALL files in this folder are not compilable by duktape. First because duktape doesn't support let variable declaration.
And even without let - it reports errors on each second line for all js files.
For example:
const { Buffer } = require('buffer');
const { ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE } = require('internal/errors').codes;
duktape throws errors on this lines.
So how this .low files where compiled which are existing in binary distribution ?
The Makefile transpiles these files with tsc before compiling them with DukTape.
I'm quite confused how to build low_js folder using duktape runtime. There is tool dukc, which compiles lib_js folder to lib .low files.
But the problem is ALL files in this folder are not compilable by duktape. First because duktape doesn't support let variable declaration.
And even without let - it reports errors on each second line for all js files.
For example:
const { Buffer } = require('buffer');
const { ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE } = require('internal/errors').codes;
duktape throws errors on this lines.
So how this .low files where compiled which are existing in binary distribution ?