@storm-software/tsdown
Version:
A package containing `tsdown` utilities for building Storm Software libraries and applications
33 lines (28 loc) • 768 B
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true});// src/config.ts
function getDefaultOptions(config) {
return {
entry: ["./src/*.ts"],
platform: "node",
target: "esnext",
mode: "production",
dts: true,
unused: {
level: "error",
ignore: ["typescript"]
},
publint: true,
fixedExtension: true,
...config
};
}
function toTSDownFormat(format) {
if (!format || Array.isArray(format) && format.length === 0) {
return ["cjs", "es"];
} else if (format === "esm") {
return "es";
} else if (Array.isArray(format)) {
return format.map((f) => f === "esm" ? "es" : f);
}
return format;
}
exports.getDefaultOptions = getDefaultOptions; exports.toTSDownFormat = toTSDownFormat;