{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/baginskicosta/bunpack/main/schema.json", "title": "@baginskicosta/bunpack", "description": "Configuration schema for Bunpack, a modern bundling tool powered by Bun.", "additionalProperties": false, "type": "object", "properties": { "$schema": { "type": "string", "description": "Path or URL to the Bunpack configuration schema." }, "outdir": { "type": "string", "description": "Output directory for generated files.", "default": "dist" }, "rootdir": { "type": "string", "description": "Root directory containing the source files.", "default": "source" }, "target": { "type": "string", "description": "Runtime target for the generated bundles.", "enum": ["bun", "node"], "default": "bun" }, "minify": { "type": "boolean", "description": "Whether to minify the generated bundles.", "default": true }, "sourcemap": { "type": "string", "description": "Source map generation mode.", "enum": ["none", "inline", "extenal", "linked"], "default": "none" }, "splitting": { "type": "boolean", "description": "Whether to enable code splitting.", "default": false }, "packages": { "type": "string", "description": "How package dependencies should be handled.", "enum": ["bundle", "external"], "default": "bundle" }, "clean": { "type": "boolean", "description": "Whether to clean the output directory before bulding.", "default": true }, "formats": { "type": "object", "additionalProperties": false, "properties": { "esm": { "$ref": "#/$defs/format" }, "cjs": { "$ref": "#/$defs/format" } } }, "entries": { "type": "array", "description": "Entry points to be bundled.", "items": { "$ref": "#/$defs/entry" }, "minItems": 1 }, "declarations": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "default": true }, "directory": { "type": "string", "description": "Directory where declaration files are generated." }, "tsconfig": { "type": "string", "description": "Path to a tsconfig file relative to project root." } }, "required": ["enabled", "directory", "tsconfig"] } }, "required": [ "outdir", "rootdir", "target", "minify", "sourcemap", "splitting", "packages", "clean", "formats", "entries" ], "$defs": { "format": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "default": true }, "directory": { "type": "string" }, "extension": { "type": "string", "pattern": "^\\.[a-zA-Z0-9]+$" } }, "required": ["enabled", "directory", "extension"] }, "entry": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" }, "entrypoint": { "type": "string" }, "default": { "type": "boolean", "default": false } }, "required": ["name", "entrypoint"] } } }