-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Description
The current JS that emscripten generates uses some old conventions + often generates unused code; I have seen a few issues going around offering manual updates of some of these things.
I wanted to note that a combination of tools like lebab, eslint and rollup could be used in a post processing step to tidy up the .js files that emscripten emits.
In particular, with the default eslint and rollup configs I just ran on a generated file called swipl.js
lebab --replace swipl.js --transform arrow,arrow-return,for-of,arg-rest,arg-spread,obj-method,obj-shorthand,no-strict,exponent,multi-var,let,class,commonjs,template,default-param,destruct-param,includes
eslint swipl.js
rollup swipl.js -o out.jsThe out.js was about 10% smaller on the project I tried and has various code smells removed such as limiting the use of var, removing unused variables etc.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels