rename transform result "js" => "code"

This commit is contained in:
Evan Wallace
2020-10-24 23:37:55 -07:00
parent 19b1d303e9
commit 2c321ef12d
12 changed files with 202 additions and 192 deletions

View File

@@ -307,11 +307,11 @@
minifyWhitespace: minifySpaces.checked,
strict: strict.checked,
charset: ascii.checked ? 'ascii' : 'utf8',
}).then(({ js, warnings }) => {
}).then(({ code, warnings }) => {
let html = messagesToHTML(addKindToMessages(warnings, 'warning'))
js = textToHTML(js);
if (minifySpaces.checked) js = `<span class="minified">${js}</span>`;
output.innerHTML = (html && html + '<hr>') + js;
code = textToHTML(code);
if (minifySpaces.checked) code = `<span class="minified">${code}</span>`;
output.innerHTML = (html && html + '<hr>') + code;
}, error => {
let { errors, warnings } = error
if (errors && warnings) output.innerHTML = messagesToHTML(