https://github.com/afcms/esbuild-plugin-json-cleaner
Cleanup/minify JSON file in esbuild
https://github.com/afcms/esbuild-plugin-json-cleaner
esbuild nodejs plugin pnpm typescript
Last synced: 4 months ago
JSON representation
Cleanup/minify JSON file in esbuild
- Host: GitHub
- URL: https://github.com/afcms/esbuild-plugin-json-cleaner
- Owner: AFCMS
- License: mit
- Created: 2024-07-09T12:39:28.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-10-21T17:16:03.000Z (8 months ago)
- Last Synced: 2025-02-28T10:04:17.900Z (4 months ago)
- Topics: esbuild, nodejs, plugin, pnpm, typescript
- Language: TypeScript
- Homepage:
- Size: 73.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esbuild-plugin-json-cleanup
[](https://www.npmjs.com/package/esbuild-plugin-json-cleaner)
[](https://jsr.io/@afcms/esbuild-plugin-json-cleaner)An esbuild plugin to cleanup JSON files by changing the indentation and removing some top level tags.
```typescript
import esbuild from "esbuild";
import JSONCleanerPlugin from "esbuild-plugin-json-cleaner";esbuild.build({
outdir: "dist",
plugins: [
JSONCleanerPlugin({
src: "src/data.json",
out: "data.json",
removeSchema: true,
removeTags: ["tag1", "tag2"],
minify: false,
space: 2
})
]
});
```