mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: code formatting with wastyle
This commit is contained in:
1 parent
496ce16dce
commit
b052e2aa78
7 files changed
+64
-25
No files matched your search
@@ -0,0 +1,12 @@
|
||||
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];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user