mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 21:58:01 +00:00
e07d0f0cb7
- Move npm package from paritytech/js-revive - Rename package to `@parity/resolc`
15 lines
340 B
JavaScript
15 lines
340 B
JavaScript
importScripts("./resolc_web.js");
|
|
|
|
// Handle messages from the main thread
|
|
onmessage = async function (e) {
|
|
const m = createRevive();
|
|
|
|
// Set input data for stdin
|
|
m.writeToStdin(e.data);
|
|
|
|
// Compile the Solidity source code
|
|
m.callMain(["--standard-json"]);
|
|
|
|
postMessage({ output: m.readFromStdout() || m.readFromStderr() });
|
|
};
|