@theholocron/tsdown-config 6.1.0 → 7.0.0

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.
@@ -0,0 +1,2 @@
1
+ import { library } from "./presets/library.js";
2
+ export { library };
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import { library } from "./presets/library.js";
2
+ export { library };
@@ -0,0 +1,11 @@
1
+ import { Options } from "tsdown";
2
+ //#region presets/library.d.ts
3
+ /**
4
+ * tsdown preset for a published ESM library.
5
+ * Single entry point, generates types, does not bundle @theholocron/* peers.
6
+ */
7
+ declare function library(options?: Options): import("tsdown").UserConfig;
8
+ /** Ready-to-use config for packages that need no customisation. */
9
+ declare const _default: import("tsdown").UserConfig;
10
+ //#endregion
11
+ export { _default as default, library };
@@ -0,0 +1,20 @@
1
+ import { defineConfig } from "tsdown";
2
+ //#region presets/library.ts
3
+ /**
4
+ * tsdown preset for a published ESM library.
5
+ * Single entry point, generates types, does not bundle @theholocron/* peers.
6
+ */
7
+ function library(options = {}) {
8
+ return defineConfig({
9
+ entry: ["src/index.ts"],
10
+ format: "esm",
11
+ dts: true,
12
+ clean: true,
13
+ deps: { neverBundle: [/^@theholocron\//] },
14
+ ...options
15
+ });
16
+ }
17
+ /** Ready-to-use config for packages that need no customisation. */
18
+ var library_default = library();
19
+ //#endregion
20
+ export { library_default as default, library };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/tsdown-config",
3
- "version": "6.1.0",
3
+ "version": "7.0.0",
4
4
  "description": "Shared tsdown configurations for @theholocron packages.",
5
5
  "homepage": "https://github.com/theholocron/configs/tree/main/packages/tsdown-config#readme",
6
6
  "bugs": "https://github.com/theholocron/configs/issues",
@@ -11,19 +11,25 @@
11
11
  "license": "GPL-3.0",
12
12
  "author": "Newton Koumantzelis",
13
13
  "type": "module",
14
+ "devDependencies": {
15
+ "tsdown": "^0.22.8",
16
+ "typescript": "^5.9.3",
17
+ "@theholocron/tsconfig": "7.0.0"
18
+ },
14
19
  "exports": {
15
20
  ".": {
16
- "import": "./index.js",
17
- "default": "./index.js"
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js",
23
+ "default": "./dist/index.js"
18
24
  },
19
25
  "./presets/library": {
20
- "import": "./presets/library.js",
21
- "default": "./presets/library.js"
26
+ "types": "./dist/presets/library.d.ts",
27
+ "import": "./dist/presets/library.js",
28
+ "default": "./dist/presets/library.js"
22
29
  }
23
30
  },
24
31
  "files": [
25
- "index.js",
26
- "presets/"
32
+ "dist/"
27
33
  ],
28
34
  "peerDependencies": {
29
35
  "tsdown": "^0"
@@ -32,5 +38,8 @@
32
38
  "access": "public"
33
39
  },
34
40
  "releases": "https://github.com/theholocron/configs/releases",
35
- "wiki": "https://github.com/theholocron/configs/wiki"
41
+ "wiki": "https://github.com/theholocron/configs/wiki",
42
+ "scripts": {
43
+ "build": "tsdown"
44
+ }
36
45
  }
package/index.js DELETED
@@ -1 +0,0 @@
1
- export { library } from "./presets/library.js";
@@ -1,22 +0,0 @@
1
- import { defineConfig } from "tsdown";
2
-
3
- /**
4
- * tsdown preset for a published ESM library.
5
- * Single entry point, generates types, does not bundle @theholocron/* peers.
6
- *
7
- * @param {import('tsdown').Options} [options]
8
- * @returns {import('tsdown').Options}
9
- */
10
- export function library(options = {}) {
11
- return defineConfig({
12
- entry: ["src/index.ts"],
13
- format: "esm",
14
- dts: true,
15
- clean: true,
16
- deps: { neverBundle: [/^@theholocron\//] },
17
- ...options,
18
- });
19
- }
20
-
21
- /** Ready-to-use config for packages that need no customisation. */
22
- export default library();