@dprint/bun 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/package.json +1 -1
- package/plugin.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @dprint/bun
|
|
2
2
|
|
|
3
|
-
npm distribution of [dprint-plugin-bun](https://github.com/dprint/dprint-plugin-bun) which is an adapter plugin for the formatter of [Bun](https://github.com/oven-sh/bun) that formats JavaScript, TypeScript, JSON, CSS, SCSS, Less, GraphQL, YAML, Markdown, MDX, HTML, Vue, and
|
|
3
|
+
npm distribution of [dprint-plugin-bun](https://github.com/dprint/dprint-plugin-bun) which is an adapter plugin for the formatter of [Bun](https://github.com/oven-sh/bun) that formats JavaScript, TypeScript, JSON, CSS, SCSS, Less, GraphQL, YAML, Markdown, MDX, HTML, Vue, Handlebars, Svelte, and TOML.
|
|
4
4
|
|
|
5
5
|
Use this with [@dprint/formatter](https://github.com/dprint/js-formatter) or just use @dprint/formatter and download the [dprint-plugin-bun Wasm file](https://github.com/dprint/dprint-plugin-bun/releases).
|
|
6
6
|
|
|
@@ -12,7 +12,8 @@ import { createFromBuffer } from "@dprint/formatter";
|
|
|
12
12
|
|
|
13
13
|
const formatter = createFromBuffer(getBuffer());
|
|
14
14
|
|
|
15
|
-
console.log(
|
|
16
|
-
|
|
17
|
-
)
|
|
15
|
+
console.log(formatter.formatText({
|
|
16
|
+
filePath: "test.js",
|
|
17
|
+
fileText: "console.log( 5 )",
|
|
18
|
+
}));
|
|
18
19
|
```
|
package/package.json
CHANGED
package/plugin.wasm
CHANGED
|
Binary file
|