ultraviolet/index.js
2022-02-19 00:10:57 -05:00

27 lines
No EOL
560 B
JavaScript

import Ultraviolet from './rewrite/index.js'
import { generate } from 'esotope-hammerhead';
import { parseScript } from 'meriyah';
const uv = new Ultraviolet({
meta: {
url: new URL('https://www.google.com'),
base: new URL('https://www.google.com')
}
});
/*
console.log(
uv.css.recast('body { background: url ( \n " coohcie " ) }')
)
*/
console.log(
uv.rewriteJS('top')
)
/*
const used = process.memoryUsage().heapUsed / 1024 / 1024;
console.log(`The script uses approximately ${Math.round(used * 100) / 100} MB`);
*/