You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
345 B
JavaScript
13 lines
345 B
JavaScript
import astyleBinaryUrl from 'wastyle/dist/astyle-optimize-size.wasm';
|
|
|
|
export default async function load() {
|
|
const { init, format } = await import('wastyle');
|
|
try {
|
|
await init(astyleBinaryUrl);
|
|
console.log('WAstyle is ready!');
|
|
return [true, format];
|
|
} catch (e) {
|
|
return [false, e.message];
|
|
}
|
|
}
|