@wasm-fmt/dart_fmt
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Test

Install

npm

npm install @wasm-fmt/dart_fmt

jsr.io

npx jsr add @fmt/dart-fmt

Usage

import init, { format } from "@wasm-fmt/dart_fmt";

await init();

const input = `void main() { print('Hello, World!'); }`;

const formatted = format(input, "main.dart");
console.log(formatted);

For Vite users:

Add "@wasm-fmt/dart_fmt" to optimizeDeps.exclude in your vite config:

{
    "optimizeDeps": {
        "exclude": ["@wasm-fmt/dart_fmt"]
    }
}
If you cannot change the vite config, you can use another import entry
import init, { format } from "@wasm-fmt/dart_fmt/vite";

// ...

Readme

Keywords

Package Sidebar

Install

npm i @wasm-fmt/dart_fmt

Weekly Downloads

18

Version

0.1.2

License

MIT

Unpacked Size

2.14 MB

Total Files

11

Last publish

Collaborators

  • magic-akari