@alessiofrittoli/package-configs 1.3.0 → 1.4.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.
- package/dist/tsdown/index.cjs +1 -1
- package/dist/tsdown/index.d.cts +15 -2
- package/dist/tsdown/index.d.mts +15 -2
- package/dist/tsdown/index.mjs +1 -1
- package/package.json +1 -1
package/dist/tsdown/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../tsconfig/index.cjs");let t=require("tsdown");const n=(n={})=>(0,t.defineConfig)(async(t,r)=>{let{target:i,watch:a
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../tsconfig/index.cjs");let t=require("tsdown");const n=(n={})=>(0,t.defineConfig)(async(t,r)=>{let{target:i,watch:a,tsconfig:o,deps:s,clean:c,outDir:l,parsedTsConfig:u,...d}=typeof n==`function`?await n(t,r):n,{target:f=i,watch:p=a,tsconfig:m=o,deps:h=s,clean:g=c??!p,outDir:_=l}=t,v=u||m||typeof m==`string`?e.parseTsConfig({filepath:typeof m==`string`?m:void 0}):void 0,y=_||v?.options.outDir||`dist`,b=f||v&&e.getTSConfigCompilerTarget({parsedTsConfig:v});return{entry:[`src/**/index.ts`],format:[`cjs`,`esm`],outDir:y,dts:!0,shims:!0,clean:g,treeshake:!0,minify:!p,sourcemap:!!p,tsconfig:m,target:b,watch:p,deps:h,...d}});exports.tsdownConfig=n;
|
package/dist/tsdown/index.d.cts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import { ParsedCommandLine } from "typescript";
|
|
1
2
|
import { InlineConfig, UserConfig, UserConfigFn as UserConfigFn$1, UserConfigFnContext } from "tsdown";
|
|
2
3
|
//#region src/tsdown/index.d.ts
|
|
3
|
-
export
|
|
4
|
+
export interface UserTsdownConfig extends UserConfig {
|
|
5
|
+
/**
|
|
6
|
+
* The already parsed TS config.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
parsedTsConfig?: ParsedCommandLine;
|
|
10
|
+
}
|
|
11
|
+
export type UserConfigFn = (
|
|
12
|
+
/**
|
|
13
|
+
* Configurations set by CLI.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
inlineConfig: InlineConfig, context: UserConfigFnContext) => UserTsdownConfig | Promise<UserTsdownConfig>;
|
|
4
17
|
/**
|
|
5
18
|
* Get `tsdown` base configuration.
|
|
6
19
|
*
|
|
@@ -25,5 +38,5 @@ export type UserConfigFn = (inlineConfig: InlineConfig, context: UserConfigFnCon
|
|
|
25
38
|
* | `target` | resolved tsconfig target |
|
|
26
39
|
* | `deps` | `{ ... }` |
|
|
27
40
|
*/
|
|
28
|
-
export declare const tsdownConfig: (options?:
|
|
41
|
+
export declare const tsdownConfig: (options?: UserTsdownConfig | UserConfigFn) => UserConfigFn$1;
|
|
29
42
|
//#endregion
|
package/dist/tsdown/index.d.mts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import { ParsedCommandLine } from "typescript";
|
|
1
2
|
import { InlineConfig, UserConfig, UserConfigFn as UserConfigFn$1, UserConfigFnContext } from "tsdown";
|
|
2
3
|
//#region src/tsdown/index.d.ts
|
|
3
|
-
export
|
|
4
|
+
export interface UserTsdownConfig extends UserConfig {
|
|
5
|
+
/**
|
|
6
|
+
* The already parsed TS config.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
parsedTsConfig?: ParsedCommandLine;
|
|
10
|
+
}
|
|
11
|
+
export type UserConfigFn = (
|
|
12
|
+
/**
|
|
13
|
+
* Configurations set by CLI.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
inlineConfig: InlineConfig, context: UserConfigFnContext) => UserTsdownConfig | Promise<UserTsdownConfig>;
|
|
4
17
|
/**
|
|
5
18
|
* Get `tsdown` base configuration.
|
|
6
19
|
*
|
|
@@ -25,5 +38,5 @@ export type UserConfigFn = (inlineConfig: InlineConfig, context: UserConfigFnCon
|
|
|
25
38
|
* | `target` | resolved tsconfig target |
|
|
26
39
|
* | `deps` | `{ ... }` |
|
|
27
40
|
*/
|
|
28
|
-
export declare const tsdownConfig: (options?:
|
|
41
|
+
export declare const tsdownConfig: (options?: UserTsdownConfig | UserConfigFn) => UserConfigFn$1;
|
|
29
42
|
//#endregion
|
package/dist/tsdown/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getTSConfigCompilerTarget as e}from"../tsconfig/index.mjs";import{defineConfig as
|
|
1
|
+
import{getTSConfigCompilerTarget as e,parseTsConfig as t}from"../tsconfig/index.mjs";import{defineConfig as n}from"tsdown";const r=(r={})=>n(async(n,i)=>{let{target:a,watch:o,tsconfig:s,deps:c,clean:l,outDir:u,parsedTsConfig:d,...f}=typeof r==`function`?await r(n,i):r,{target:p=a,watch:m=o,tsconfig:h=s,deps:g=c,clean:_=l??!m,outDir:v=u}=n,y=d||h||typeof h==`string`?t({filepath:typeof h==`string`?h:void 0}):void 0,b=v||y?.options.outDir||`dist`,x=p||y&&e({parsedTsConfig:y});return{entry:[`src/**/index.ts`],format:[`cjs`,`esm`],outDir:b,dts:!0,shims:!0,clean:_,treeshake:!0,minify:!m,sourcemap:!!m,tsconfig:h,target:x,watch:m,deps:g,...f}});export{r as tsdownConfig};
|