@modern-js/module-tools 2.41.0 → 2.42.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.
Files changed (97) hide show
  1. package/dist/build.d.ts +1 -1
  2. package/dist/builder/build.d.ts +7 -7
  3. package/dist/builder/build.js +3 -1
  4. package/dist/builder/clear.d.ts +1 -2
  5. package/dist/builder/clear.js +2 -8
  6. package/dist/builder/copy.d.ts +9 -9
  7. package/dist/builder/dts/index.d.ts +1 -1
  8. package/dist/builder/dts/rollup.d.ts +1 -13
  9. package/dist/builder/dts/tsc.d.ts +1 -1
  10. package/dist/builder/dts/tsc.js +20 -15
  11. package/dist/builder/esbuild/adapter.d.ts +1 -1
  12. package/dist/builder/esbuild/hook.d.ts +1 -1
  13. package/dist/builder/esbuild/index.d.ts +28 -28
  14. package/dist/builder/esbuild/resolve.d.ts +9 -9
  15. package/dist/builder/esbuild/sourcemap.d.ts +14 -14
  16. package/dist/builder/esbuild/transform.d.ts +4 -4
  17. package/dist/builder/esbuild/watch.d.ts +1 -1
  18. package/dist/builder/esbuild/write-file.d.ts +1 -1
  19. package/dist/builder/feature/asset.d.ts +5 -5
  20. package/dist/builder/feature/format-cjs.d.ts +3 -3
  21. package/dist/builder/feature/index.d.ts +1 -1
  22. package/dist/builder/feature/json.d.ts +3 -3
  23. package/dist/builder/feature/redirect.d.ts +3 -3
  24. package/dist/builder/feature/style/index.d.ts +3 -3
  25. package/dist/builder/feature/style/lessAliasPlugin.d.ts +7 -7
  26. package/dist/builder/feature/style/lessRender.d.ts +1 -1
  27. package/dist/builder/feature/style/postcssTransformer.d.ts +3 -3
  28. package/dist/builder/feature/style/postcssUrlPlugin.d.ts +3 -3
  29. package/dist/builder/feature/style/sassRender.d.ts +1 -1
  30. package/dist/builder/feature/style/transformStyle.d.ts +7 -7
  31. package/dist/builder/feature/style/utils.d.ts +3 -3
  32. package/dist/builder/feature/swc.d.ts +5 -5
  33. package/dist/builder/feature/terser.d.ts +3 -3
  34. package/dist/builder/index.d.ts +4 -4
  35. package/dist/builder/index.js +0 -1
  36. package/dist/builder/platform.d.ts +1 -1
  37. package/dist/cli.d.ts +1 -1
  38. package/dist/command.d.ts +1 -1
  39. package/dist/config/defineConfig.d.ts +1 -1
  40. package/dist/config/merge.d.ts +4 -4
  41. package/dist/config/normalize.d.ts +3 -3
  42. package/dist/config/transformLegacyConfig.d.ts +1 -1
  43. package/dist/config/valid.d.ts +1 -1
  44. package/dist/constants/build.d.ts +1 -1
  45. package/dist/constants/color.d.ts +1 -1
  46. package/dist/constants/dts.d.ts +0 -1
  47. package/dist/constants/dts.js +0 -3
  48. package/dist/constants/file.d.ts +1 -1
  49. package/dist/constants/legacy-preset.d.ts +11 -11
  50. package/dist/constants/loader.d.ts +1 -1
  51. package/dist/constants/log.d.ts +1 -1
  52. package/dist/constants/preset.d.ts +5 -5
  53. package/dist/debug.d.ts +1 -1
  54. package/dist/dev.d.ts +1 -1
  55. package/dist/error.d.ts +19 -19
  56. package/dist/hooks/build.d.ts +16 -16
  57. package/dist/hooks/dev.d.ts +11 -11
  58. package/dist/hooks/index.d.ts +29 -29
  59. package/dist/hooks/misc.d.ts +11 -11
  60. package/dist/index.d.ts +1 -1
  61. package/dist/locale/en.d.ts +40 -40
  62. package/dist/locale/index.d.ts +79 -79
  63. package/dist/locale/zh.d.ts +40 -40
  64. package/dist/plugins.d.ts +1 -1
  65. package/dist/types/color.d.ts +1 -1
  66. package/dist/types/command.d.ts +9 -9
  67. package/dist/types/config/copy.d.ts +10 -10
  68. package/dist/types/config/dev.d.ts +4 -4
  69. package/dist/types/config/index.d.ts +106 -106
  70. package/dist/types/config/style.d.ts +37 -37
  71. package/dist/types/context.d.ts +4 -4
  72. package/dist/types/dts.d.ts +39 -38
  73. package/dist/types/esbuild.d.ts +77 -77
  74. package/dist/types/hooks.d.ts +14 -14
  75. package/dist/types/index.d.ts +7 -7
  76. package/dist/types/legacyConfig/index.d.ts +8 -8
  77. package/dist/types/legacyConfig/output.d.ts +44 -44
  78. package/dist/types/legacyConfig/source.d.ts +10 -10
  79. package/dist/types/legacyConfig/tools.d.ts +39 -39
  80. package/dist/utils/assert.d.ts +1 -1
  81. package/dist/utils/builder.d.ts +9 -9
  82. package/dist/utils/common.d.ts +1 -1
  83. package/dist/utils/dts.d.ts +4 -34
  84. package/dist/utils/dts.js +71 -93
  85. package/dist/utils/hash.d.ts +1 -1
  86. package/dist/utils/index.d.ts +1 -2
  87. package/dist/utils/index.js +0 -2
  88. package/dist/utils/input.d.ts +5 -8
  89. package/dist/utils/log.d.ts +1 -1
  90. package/dist/utils/map.d.ts +5 -5
  91. package/dist/utils/onExit.d.ts +1 -1
  92. package/dist/utils/outExtension.d.ts +6 -6
  93. package/dist/utils/print.d.ts +3 -3
  94. package/dist/utils/style.d.ts +7 -7
  95. package/package.json +14 -20
  96. package/dist/utils/tspath.d.ts +0 -15
  97. package/dist/utils/tspath.js +0 -114
@@ -1,45 +1,45 @@
1
1
  export declare const ZH_LOCALE: {
2
- command: {
3
- shared: {
4
- config: string;
5
- noNeedInstall: string;
2
+ command: {
3
+ shared: {
4
+ config: string;
5
+ noNeedInstall: string;
6
+ };
7
+ build: {
8
+ describe: string;
9
+ watch: string;
10
+ tsconfig: string;
11
+ styleOnly: string;
12
+ platform: string;
13
+ noTsc: string;
14
+ dts: string;
15
+ noClear: string;
16
+ };
17
+ dev: {
18
+ describe: string;
19
+ tsconfig: string;
20
+ };
21
+ new: {
22
+ describe: string;
23
+ debug: string;
24
+ config: string;
25
+ distTag: string;
26
+ registry: string;
27
+ lang: string;
28
+ };
6
29
  };
7
- build: {
8
- describe: string;
9
- watch: string;
10
- tsconfig: string;
11
- styleOnly: string;
12
- platform: string;
13
- noTsc: string;
14
- dts: string;
15
- noClear: string;
30
+ log: {
31
+ dev: {
32
+ noDevtools: string;
33
+ };
34
+ buildConfigTip: string;
16
35
  };
17
- dev: {
18
- describe: string;
19
- tsconfig: string;
36
+ errors: {
37
+ externalHelpers: string;
20
38
  };
21
- new: {
22
- describe: string;
23
- debug: string;
24
- config: string;
25
- distTag: string;
26
- registry: string;
27
- lang: string;
39
+ warns: {
40
+ dts: {
41
+ abortOnError: string;
42
+ };
43
+ clearRootPath: string;
28
44
  };
29
- };
30
- log: {
31
- dev: {
32
- noDevtools: string;
33
- };
34
- buildConfigTip: string;
35
- };
36
- errors: {
37
- externalHelpers: string;
38
- };
39
- warns: {
40
- dts: {
41
- abortOnError: string;
42
- };
43
- clearRootPath: string;
44
- };
45
- };
45
+ };
package/dist/plugins.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import type { CliPlugin } from '@modern-js/core';
2
- export declare const getPlugins: (runningCmd: string) => CliPlugin[];
2
+ export declare const getPlugins: (runningCmd: string) => CliPlugin[];
@@ -1 +1 @@
1
- export type RGB = [number, number, number];
1
+ export type RGB = [number, number, number];
@@ -1,12 +1,12 @@
1
1
  export interface DevCommandOptions {
2
- port?: string;
3
- tsconfig?: string;
2
+ port?: string;
3
+ tsconfig?: string;
4
4
  }
5
5
  export interface BuildCommandOptions {
6
- clear: boolean;
7
- dts: boolean;
8
- watch: boolean;
9
- config?: string;
10
- platform?: boolean | string[];
11
- tsconfig?: string;
12
- }
6
+ clear: boolean;
7
+ dts: boolean;
8
+ watch: boolean;
9
+ config?: string;
10
+ platform?: boolean | string[];
11
+ tsconfig?: string;
12
+ }
@@ -1,15 +1,15 @@
1
1
  import type { globby } from '@modern-js/utils';
2
2
  export interface CopyPattern {
3
- from: string;
4
- to?: string;
5
- context?: string;
6
- globOptions?: globby.GlobbyOptions;
3
+ from: string;
4
+ to?: string;
5
+ context?: string;
6
+ globOptions?: globby.GlobbyOptions;
7
7
  }
8
8
  export interface CopyOptions {
9
- patterns?: CopyPattern[];
10
- options?: {
11
- concurrency?: number;
12
- enableCopySync?: boolean;
13
- };
9
+ patterns?: CopyPattern[];
10
+ options?: {
11
+ concurrency?: number;
12
+ enableCopySync?: boolean;
13
+ };
14
14
  }
15
- export type CopyConfig = CopyOptions;
15
+ export type CopyConfig = CopyOptions;
@@ -1,8 +1,8 @@
1
1
  import type { ToolsConfig as WebpackBuilderToolsConfig } from '@modern-js/builder-webpack-provider';
2
2
  export interface StorybookBuildConfig {
3
- webpack?: WebpackBuilderToolsConfig['webpack'];
4
- webpackChain?: WebpackBuilderToolsConfig['webpackChain'];
3
+ webpack?: WebpackBuilderToolsConfig['webpack'];
4
+ webpackChain?: WebpackBuilderToolsConfig['webpackChain'];
5
5
  }
6
6
  export interface Dev {
7
- storybook?: StorybookBuildConfig;
8
- }
7
+ storybook?: StorybookBuildConfig;
8
+ }
@@ -13,8 +13,8 @@ export * from './style';
13
13
  export * from './dev';
14
14
  export * from './copy';
15
15
  export type HookList = {
16
- name: string;
17
- apply: (compiler: ICompiler) => void;
16
+ name: string;
17
+ apply: (compiler: ICompiler) => void;
18
18
  }[];
19
19
  export type EsbuildOptions = (options: BuildOptions) => BuildOptions;
20
20
  export type BuildType = 'bundleless' | 'bundle';
@@ -22,7 +22,7 @@ export type Target = 'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' |
22
22
  export type Minify = 'esbuild' | 'terser' | false | TerserMinifyOptions;
23
23
  export type Format = 'esm' | 'cjs' | 'umd' | 'iife';
24
24
  export type Input = {
25
- [name: string]: string;
25
+ [name: string]: string;
26
26
  } | string[];
27
27
  export type Globals = Record<any, any>;
28
28
  export type Define = Record<string, string>;
@@ -33,134 +33,134 @@ export type SideEffects = RegExp[] | boolean | ((id: string, external: boolean)
33
33
  * @experimental
34
34
  */
35
35
  export type Redirect = {
36
- alias?: boolean;
37
- style?: boolean;
38
- asset?: boolean;
39
- autoExtension?: boolean;
36
+ alias?: boolean;
37
+ style?: boolean;
38
+ asset?: boolean;
39
+ autoExtension?: boolean;
40
40
  };
41
41
  export type DTSOptions = {
42
- abortOnError: boolean;
43
- distPath: string;
44
- only: boolean;
45
- /**
46
- * @deprecated
47
- * use buildConfig.tsconfig instead.
48
- */
49
- tsconfigPath?: string;
50
- /**
51
- * Only for rollup-plugin-dts, see more in https://github.com/Swatinem/rollup-plugin-dts#what-to-expect.
52
- * We hope you use external to prevent them(like @types) which come from node_modules from be bundled.
53
- * However, some types from outside that we don't re-export are also checked by plugin.
54
- * And a third-party package is uncontrollable, it may cause errors.
55
- * You can overridden by setting it false to excluded all packages from node_modules.
56
- * @default true
57
- */
58
- respectExternal: boolean;
42
+ abortOnError: boolean;
43
+ distPath: string;
44
+ only: boolean;
45
+ /**
46
+ * @deprecated
47
+ * use buildConfig.tsconfig instead.
48
+ */
49
+ tsconfigPath?: string;
50
+ /**
51
+ * Only for rollup-plugin-dts, see more in https://github.com/Swatinem/rollup-plugin-dts#what-to-expect.
52
+ * We hope you use external to prevent them(like @types) which come from node_modules from be bundled.
53
+ * However, some types from outside that we don't re-export are also checked by plugin.
54
+ * And a third-party package is uncontrollable, it may cause errors.
55
+ * You can overridden by setting it false to excluded all packages from node_modules.
56
+ * @default true
57
+ */
58
+ respectExternal: boolean;
59
59
  };
60
60
  export type DTS = false | Partial<DTSOptions>;
61
61
  export interface SvgrOptions extends Config {
62
- include?: Parameters<CreateFilter>[0];
63
- exclude?: Parameters<CreateFilter>[1];
62
+ include?: Parameters<CreateFilter>[0];
63
+ exclude?: Parameters<CreateFilter>[1];
64
64
  }
65
65
  export interface Asset {
66
- path?: string;
67
- limit?: number;
68
- publicPath?: string | ((filePath: string) => string);
69
- svgr?: boolean | SvgrOptions;
66
+ path?: string;
67
+ limit?: number;
68
+ publicPath?: string | ((filePath: string) => string);
69
+ svgr?: boolean | SvgrOptions;
70
70
  }
71
71
  export type AutoExternal = boolean | {
72
- dependencies?: boolean;
73
- peerDependencies?: boolean;
72
+ dependencies?: boolean;
73
+ peerDependencies?: boolean;
74
74
  };
75
75
  export type JSX = 'automatic' | 'transform' | 'preserve';
76
76
  export type ExternalHelpers = boolean;
77
77
  export type BannerAndFooter = {
78
- js?: string;
79
- css?: string;
80
- dts?: string;
78
+ js?: string;
79
+ css?: string;
80
+ dts?: string;
81
81
  };
82
82
  export type AliasOption = Record<string, string> | ((aliases: Record<string, string>) => Record<string, string> | void);
83
83
  export type Resolve = {
84
- mainFields?: string[];
85
- jsExtensions?: string[];
84
+ mainFields?: string[];
85
+ jsExtensions?: string[];
86
86
  };
87
87
  export type BaseBuildConfig = Omit<Required<PartialBaseBuildConfig>, 'dts' | 'style' | 'alias' | 'sideEffects' | 'asset' | 'resolve'> & {
88
- sideEffects?: SideEffects;
89
- dts: false | DTSOptions;
90
- style: Style;
91
- alias: Record<string, string>;
92
- asset: Required<Asset>;
93
- resolve: Required<Resolve>;
88
+ sideEffects?: SideEffects;
89
+ dts: false | DTSOptions;
90
+ style: Style;
91
+ alias: Record<string, string>;
92
+ asset: Required<Asset>;
93
+ resolve: Required<Resolve>;
94
94
  };
95
95
  export type PartialBaseBuildConfig = {
96
- shims?: boolean;
97
- autoExtension?: boolean;
98
- resolve?: Resolve;
99
- footer?: BannerAndFooter;
100
- banner?: BannerAndFooter;
101
- buildType?: 'bundleless' | 'bundle';
102
- format?: Format;
103
- target?: Target;
104
- dts?: DTS;
105
- sourceMap?: boolean | 'inline' | 'external';
106
- sourceDir?: string;
107
- copy?: CopyConfig;
108
- asset?: Asset;
109
- jsx?: JSX;
110
- outDir?: string;
111
- alias?: AliasOption;
112
- hooks?: HookList;
113
- input?: Input;
114
- tsconfig?: string;
115
- metafile?: boolean;
116
- platform?: Platform;
117
- splitting?: boolean;
118
- minify?: Minify;
119
- externals?: Externals;
120
- autoExternal?: AutoExternal;
121
- umdGlobals?: Globals;
122
- umdModuleName?: ((chunkName: string) => string) | string | undefined;
123
- define?: Define;
124
- style?: StyleConfig;
125
- redirect?: Redirect;
126
- sideEffects?: SideEffects;
127
- esbuildOptions?: EsbuildOptions;
128
- /**
129
- * @internal
130
- * cache transform result or not
131
- */
132
- transformCache?: boolean;
133
- externalHelpers?: ExternalHelpers;
134
- transformImport?: ImportItem[];
135
- transformLodash?: boolean;
136
- /**
137
- * @deprecated
138
- * @internal
139
- */
140
- disableSwcTransform?: boolean;
141
- /**
142
- * @deprecated
143
- */
144
- sourceType?: 'commonjs' | 'module';
96
+ shims?: boolean;
97
+ autoExtension?: boolean;
98
+ resolve?: Resolve;
99
+ footer?: BannerAndFooter;
100
+ banner?: BannerAndFooter;
101
+ buildType?: 'bundleless' | 'bundle';
102
+ format?: Format;
103
+ target?: Target;
104
+ dts?: DTS;
105
+ sourceMap?: boolean | 'inline' | 'external';
106
+ sourceDir?: string;
107
+ copy?: CopyConfig;
108
+ asset?: Asset;
109
+ jsx?: JSX;
110
+ outDir?: string;
111
+ alias?: AliasOption;
112
+ hooks?: HookList;
113
+ input?: Input;
114
+ tsconfig?: string;
115
+ metafile?: boolean;
116
+ platform?: Platform;
117
+ splitting?: boolean;
118
+ minify?: Minify;
119
+ externals?: Externals;
120
+ autoExternal?: AutoExternal;
121
+ umdGlobals?: Globals;
122
+ umdModuleName?: ((chunkName: string) => string) | string | undefined;
123
+ define?: Define;
124
+ style?: StyleConfig;
125
+ redirect?: Redirect;
126
+ sideEffects?: SideEffects;
127
+ esbuildOptions?: EsbuildOptions;
128
+ /**
129
+ * @internal
130
+ * cache transform result or not
131
+ */
132
+ transformCache?: boolean;
133
+ externalHelpers?: ExternalHelpers;
134
+ transformImport?: ImportItem[];
135
+ transformLodash?: boolean;
136
+ /**
137
+ * @deprecated
138
+ * @internal
139
+ */
140
+ disableSwcTransform?: boolean;
141
+ /**
142
+ * @deprecated
143
+ */
144
+ sourceType?: 'commonjs' | 'module';
145
145
  };
146
146
  export type BuildConfig = BaseBuildConfig | BaseBuildConfig[];
147
147
  export type PartialBuildConfig = PartialBaseBuildConfig | PartialBaseBuildConfig[];
148
148
  export type BuildPreset = keyof typeof presetList | ((options: {
149
- preset: typeof internalPreset;
150
- extendPreset: (extendPresetName: keyof typeof internalPreset, extendBuildConfig: PartialBaseBuildConfig) => PartialBaseBuildConfig[];
149
+ preset: typeof internalPreset;
150
+ extendPreset: (extendPresetName: keyof typeof internalPreset, extendBuildConfig: PartialBaseBuildConfig) => PartialBaseBuildConfig[];
151
151
  }) => PartialBaseBuildConfig[] | Promise<PartialBaseBuildConfig[]>);
152
152
  export interface RuntimeUserConfig {
153
- [name: string]: any;
153
+ [name: string]: any;
154
154
  }
155
155
  export interface ModuleExtraConfig {
156
- /**
157
- * @deprecated designSystem is no longer required.
158
- * If you are using Tailwind CSS, you can now use the `theme` option of Tailwind CSS, they are the same.
159
- */
160
- designSystem?: Record<string, any>;
161
- buildConfig?: PartialBuildConfig;
162
- buildPreset?: BuildPreset;
163
- dev?: Dev;
164
- testing?: TestConfig;
165
- runtime?: RuntimeUserConfig;
166
- }
156
+ /**
157
+ * @deprecated designSystem is no longer required.
158
+ * If you are using Tailwind CSS, you can now use the `theme` option of Tailwind CSS, they are the same.
159
+ */
160
+ designSystem?: Record<string, any>;
161
+ buildConfig?: PartialBuildConfig;
162
+ buildPreset?: BuildPreset;
163
+ dev?: Dev;
164
+ testing?: TestConfig;
165
+ runtime?: RuntimeUserConfig;
166
+ }
@@ -4,61 +4,61 @@ import Less from '../../../compiled/less';
4
4
  type LocalsConventionFunction = (originalClassName: string, generatedClassName: string, inputFile: string) => string;
5
5
  type GenerateScopedNameFunction = (name: string, filename: string, css: string) => string;
6
6
  declare class Loader {
7
- finalSource?: string | undefined;
8
- constructor(root: string, plugins: Plugin[]);
9
- fetch(file: string, relativeTo: string, depTrace: string): Promise<{
10
- [key: string]: string;
11
- }>;
7
+ finalSource?: string | undefined;
8
+ constructor(root: string, plugins: Plugin[]);
9
+ fetch(file: string, relativeTo: string, depTrace: string): Promise<{
10
+ [key: string]: string;
11
+ }>;
12
12
  }
13
13
  type AdditionalData = string | ((filePath: string) => string);
14
14
  export type Modules = {
15
- localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly' | LocalsConventionFunction;
16
- scopeBehaviour?: 'global' | 'local';
17
- globalModulePaths?: RegExp[];
18
- generateScopedName?: string | GenerateScopedNameFunction;
19
- hashPrefix?: string;
20
- exportGlobals?: boolean;
21
- root?: string;
22
- resolve?: (file: string) => string | Promise<string>;
23
- Loader?: typeof Loader;
24
- getJSON?: (cssFilename: string, json: {
25
- [name: string]: string;
26
- }, outputFilename?: string) => void;
15
+ localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly' | LocalsConventionFunction;
16
+ scopeBehaviour?: 'global' | 'local';
17
+ globalModulePaths?: RegExp[];
18
+ generateScopedName?: string | GenerateScopedNameFunction;
19
+ hashPrefix?: string;
20
+ exportGlobals?: boolean;
21
+ root?: string;
22
+ resolve?: (file: string) => string | Promise<string>;
23
+ Loader?: typeof Loader;
24
+ getJSON?: (cssFilename: string, json: {
25
+ [name: string]: string;
26
+ }, outputFilename?: string) => void;
27
27
  };
28
28
  export type AutoModules = boolean | RegExp;
29
29
  export type LessOptions = {
30
- additionalData?: AdditionalData;
31
- implementation?: object | string;
32
- lessOptions?: Less.Options;
30
+ additionalData?: AdditionalData;
31
+ implementation?: object | string;
32
+ lessOptions?: Less.Options;
33
33
  };
34
34
  export type SassOptions = {
35
- additionalData?: AdditionalData;
36
- implementation?: object | string;
37
- sassOptions?: sassOptions<'async'>;
35
+ additionalData?: AdditionalData;
36
+ implementation?: object | string;
37
+ sassOptions?: sassOptions<'async'>;
38
38
  };
39
39
  export type PostcssOptions = {
40
- processOptions?: ProcessOptions;
41
- plugins?: PostCSSPlugin[];
40
+ processOptions?: ProcessOptions;
41
+ plugins?: PostCSSPlugin[];
42
42
  };
43
43
  export type LessConfig = LessOptions | ((options: LessOptions) => LessOptions | void);
44
44
  export type SassConfig = SassOptions | ((options: SassOptions) => SassOptions | void);
45
45
  export type PostCSSConfigUtils = {
46
- addPlugins: (plugins: PostCSSPlugin | PostCSSPlugin[]) => void;
46
+ addPlugins: (plugins: PostCSSPlugin | PostCSSPlugin[]) => void;
47
47
  };
48
48
  export type PostCSSConfig = PostcssOptions | ((options: PostcssOptions, utils: PostCSSConfigUtils) => PostcssOptions | void);
49
49
  export type TailwindCSSConfig = Record<string, any> | ((options: Record<string, any>) => Record<string, any> | void);
50
50
  export interface Style extends Required<StyleConfig> {
51
- sass: SassOptions;
52
- less: LessOptions;
53
- postcss: PostcssOptions;
51
+ sass: SassOptions;
52
+ less: LessOptions;
53
+ postcss: PostcssOptions;
54
54
  }
55
55
  export interface StyleConfig {
56
- inject?: boolean;
57
- sass?: SassConfig;
58
- less?: LessConfig;
59
- postcss?: PostCSSConfig;
60
- autoModules?: boolean | RegExp;
61
- modules?: Modules;
62
- tailwindcss?: TailwindCSSConfig;
56
+ inject?: boolean;
57
+ sass?: SassConfig;
58
+ less?: LessConfig;
59
+ postcss?: PostCSSConfig;
60
+ autoModules?: boolean | RegExp;
61
+ modules?: Modules;
62
+ tailwindcss?: TailwindCSSConfig;
63
63
  }
64
- export {};
64
+ export {};
@@ -1,5 +1,5 @@
1
1
  export interface ModuleContext {
2
- isTsProject: boolean;
3
- appDirectory: string;
4
- srcDirectory: string;
5
- }
2
+ isTsProject: boolean;
3
+ appDirectory: string;
4
+ srcDirectory: string;
5
+ }
@@ -1,45 +1,46 @@
1
1
  import type { AliasOption, BaseBuildConfig, Input } from './config';
2
2
  export interface GeneratorDtsConfig {
3
- appDirectory: string;
4
- tsconfigPath: string;
5
- watch: boolean;
6
- sourceDir: string;
7
- alias: AliasOption;
8
- abortOnError?: boolean;
9
- footer?: string;
10
- banner?: string;
11
- distPath: string;
12
- externals: BaseBuildConfig['externals'];
13
- input: Input;
14
- respectExternal: boolean;
15
- dtsExtension: string;
3
+ appDirectory: string;
4
+ tsconfigPath: string;
5
+ watch: boolean;
6
+ sourceDir: string;
7
+ alias: AliasOption;
8
+ abortOnError?: boolean;
9
+ footer?: string;
10
+ banner?: string;
11
+ distPath: string;
12
+ externals: BaseBuildConfig['externals'];
13
+ input: Input;
14
+ respectExternal: boolean;
15
+ dtsExtension: string;
16
+ userTsconfig: ITsconfig;
16
17
  }
17
18
  export interface GeneratedDtsInfo {
18
- userTsconfig: ITsconfig;
19
- tempTsconfigPath: string;
20
- tempDistAbsRootPath: string;
21
- tempDistAbsSrcPath: string;
19
+ userTsconfig: ITsconfig;
20
+ tempTsconfigPath: string;
21
+ tempDistAbsRootPath: string;
22
+ tempDistAbsSrcPath: string;
22
23
  }
23
24
  export type TsTarget = 'es3' | 'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'esnext';
24
25
  export interface ITsconfig {
25
- compilerOptions?: {
26
- rootDir?: string;
27
- baseUrl?: string;
28
- declaration?: boolean;
29
- declarationDir?: string;
30
- emitDeclarationOnly?: boolean;
31
- emitDecoratorMetadata?: boolean;
32
- isolatedModules?: boolean;
33
- allowJs?: boolean;
34
- outDir?: string;
35
- paths?: Record<string, string[]>;
36
- target?: TsTarget;
37
- useDefineForClassFields?: boolean;
38
- } | undefined;
39
- include?: string[];
40
- exclude?: string[];
41
- extends?: string;
42
- references?: {
43
- path?: string;
44
- }[];
45
- }
26
+ compilerOptions?: {
27
+ rootDir?: string;
28
+ baseUrl?: string;
29
+ declaration?: boolean;
30
+ declarationDir?: string;
31
+ emitDeclarationOnly?: boolean;
32
+ emitDecoratorMetadata?: boolean;
33
+ isolatedModules?: boolean;
34
+ allowJs?: boolean;
35
+ outDir?: string;
36
+ paths?: Record<string, string[]>;
37
+ target?: TsTarget;
38
+ useDefineForClassFields?: boolean;
39
+ } | undefined;
40
+ include?: string[];
41
+ exclude?: string[];
42
+ extends?: string;
43
+ references?: {
44
+ path?: string;
45
+ }[];
46
+ }