@modern-js/module-tools 2.41.0 → 2.42.1
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/build.d.ts +1 -1
- package/dist/builder/build.d.ts +7 -7
- package/dist/builder/build.js +3 -1
- package/dist/builder/clear.d.ts +1 -2
- package/dist/builder/clear.js +2 -8
- package/dist/builder/copy.d.ts +9 -9
- package/dist/builder/dts/index.d.ts +1 -1
- package/dist/builder/dts/rollup.d.ts +1 -13
- package/dist/builder/dts/tsc.d.ts +1 -1
- package/dist/builder/dts/tsc.js +38 -17
- package/dist/builder/esbuild/adapter.d.ts +1 -1
- package/dist/builder/esbuild/hook.d.ts +1 -1
- package/dist/builder/esbuild/index.d.ts +28 -28
- package/dist/builder/esbuild/resolve.d.ts +9 -9
- package/dist/builder/esbuild/sourcemap.d.ts +14 -14
- package/dist/builder/esbuild/transform.d.ts +4 -4
- package/dist/builder/esbuild/watch.d.ts +1 -1
- package/dist/builder/esbuild/write-file.d.ts +1 -1
- package/dist/builder/feature/asset.d.ts +5 -5
- package/dist/builder/feature/format-cjs.d.ts +3 -3
- package/dist/builder/feature/index.d.ts +1 -1
- package/dist/builder/feature/json.d.ts +3 -3
- package/dist/builder/feature/redirect.d.ts +3 -3
- package/dist/builder/feature/style/index.d.ts +3 -3
- package/dist/builder/feature/style/lessAliasPlugin.d.ts +7 -7
- package/dist/builder/feature/style/lessRender.d.ts +1 -1
- package/dist/builder/feature/style/postcssTransformer.d.ts +3 -3
- package/dist/builder/feature/style/postcssUrlPlugin.d.ts +3 -3
- package/dist/builder/feature/style/sassRender.d.ts +1 -1
- package/dist/builder/feature/style/transformStyle.d.ts +7 -7
- package/dist/builder/feature/style/utils.d.ts +3 -3
- package/dist/builder/feature/swc.d.ts +5 -5
- package/dist/builder/feature/terser.d.ts +3 -3
- package/dist/builder/index.d.ts +4 -4
- package/dist/builder/index.js +0 -1
- package/dist/builder/platform.d.ts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/command.d.ts +1 -1
- package/dist/config/defineConfig.d.ts +1 -1
- package/dist/config/merge.d.ts +4 -4
- package/dist/config/normalize.d.ts +3 -3
- package/dist/config/transformLegacyConfig.d.ts +1 -1
- package/dist/config/valid.d.ts +1 -1
- package/dist/constants/build.d.ts +1 -1
- package/dist/constants/color.d.ts +1 -1
- package/dist/constants/dts.d.ts +0 -1
- package/dist/constants/dts.js +0 -3
- package/dist/constants/file.d.ts +1 -1
- package/dist/constants/legacy-preset.d.ts +11 -11
- package/dist/constants/loader.d.ts +1 -1
- package/dist/constants/log.d.ts +1 -1
- package/dist/constants/preset.d.ts +5 -5
- package/dist/debug.d.ts +1 -1
- package/dist/dev.d.ts +1 -1
- package/dist/error.d.ts +19 -19
- package/dist/hooks/build.d.ts +16 -16
- package/dist/hooks/dev.d.ts +11 -11
- package/dist/hooks/index.d.ts +29 -29
- package/dist/hooks/misc.d.ts +11 -11
- package/dist/index.d.ts +1 -1
- package/dist/locale/en.d.ts +40 -40
- package/dist/locale/index.d.ts +79 -79
- package/dist/locale/zh.d.ts +40 -40
- package/dist/plugins.d.ts +1 -1
- package/dist/types/color.d.ts +1 -1
- package/dist/types/command.d.ts +9 -9
- package/dist/types/config/copy.d.ts +10 -10
- package/dist/types/config/dev.d.ts +4 -4
- package/dist/types/config/index.d.ts +106 -106
- package/dist/types/config/style.d.ts +37 -37
- package/dist/types/context.d.ts +4 -4
- package/dist/types/dts.d.ts +39 -38
- package/dist/types/esbuild.d.ts +77 -77
- package/dist/types/hooks.d.ts +14 -14
- package/dist/types/index.d.ts +7 -7
- package/dist/types/legacyConfig/index.d.ts +8 -8
- package/dist/types/legacyConfig/output.d.ts +44 -44
- package/dist/types/legacyConfig/source.d.ts +10 -10
- package/dist/types/legacyConfig/tools.d.ts +39 -39
- package/dist/utils/assert.d.ts +1 -1
- package/dist/utils/builder.d.ts +9 -9
- package/dist/utils/common.d.ts +1 -1
- package/dist/utils/dts.d.ts +4 -34
- package/dist/utils/dts.js +71 -93
- package/dist/utils/hash.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.js +0 -2
- package/dist/utils/input.d.ts +5 -8
- package/dist/utils/log.d.ts +1 -1
- package/dist/utils/map.d.ts +5 -5
- package/dist/utils/onExit.d.ts +1 -1
- package/dist/utils/outExtension.d.ts +6 -6
- package/dist/utils/print.d.ts +3 -3
- package/dist/utils/style.d.ts +7 -7
- package/package.json +14 -20
- package/dist/utils/tspath.d.ts +0 -15
- package/dist/utils/tspath.js +0 -114
package/dist/locale/zh.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
export declare const ZH_LOCALE: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
tsconfig: string;
|
|
36
|
+
errors: {
|
|
37
|
+
externalHelpers: string;
|
|
20
38
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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[];
|
package/dist/types/color.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type RGB = [number, number, number];
|
|
1
|
+
export type RGB = [number, number, number];
|
package/dist/types/command.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export interface DevCommandOptions {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
port?: string;
|
|
3
|
+
tsconfig?: string;
|
|
4
4
|
}
|
|
5
5
|
export interface BuildCommandOptions {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
from: string;
|
|
4
|
+
to?: string;
|
|
5
|
+
context?: string;
|
|
6
|
+
globOptions?: globby.GlobbyOptions;
|
|
7
7
|
}
|
|
8
8
|
export interface CopyOptions {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
4
|
-
|
|
3
|
+
webpack?: WebpackBuilderToolsConfig['webpack'];
|
|
4
|
+
webpackChain?: WebpackBuilderToolsConfig['webpackChain'];
|
|
5
5
|
}
|
|
6
6
|
export interface Dev {
|
|
7
|
-
|
|
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
|
-
|
|
17
|
-
|
|
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
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
alias?: boolean;
|
|
37
|
+
style?: boolean;
|
|
38
|
+
asset?: boolean;
|
|
39
|
+
autoExtension?: boolean;
|
|
40
40
|
};
|
|
41
41
|
export type DTSOptions = {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
63
|
-
|
|
62
|
+
include?: Parameters<CreateFilter>[0];
|
|
63
|
+
exclude?: Parameters<CreateFilter>[1];
|
|
64
64
|
}
|
|
65
65
|
export interface Asset {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
73
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
85
|
-
|
|
84
|
+
mainFields?: string[];
|
|
85
|
+
jsExtensions?: string[];
|
|
86
86
|
};
|
|
87
87
|
export type BaseBuildConfig = Omit<Required<PartialBaseBuildConfig>, 'dts' | 'style' | 'alias' | 'sideEffects' | 'asset' | 'resolve'> & {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
|
|
150
|
-
|
|
149
|
+
preset: typeof internalPreset;
|
|
150
|
+
extendPreset: (extendPresetName: keyof typeof internalPreset, extendBuildConfig: PartialBaseBuildConfig) => PartialBaseBuildConfig[];
|
|
151
151
|
}) => PartialBaseBuildConfig[] | Promise<PartialBaseBuildConfig[]>);
|
|
152
152
|
export interface RuntimeUserConfig {
|
|
153
|
-
|
|
153
|
+
[name: string]: any;
|
|
154
154
|
}
|
|
155
155
|
export interface ModuleExtraConfig {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
additionalData?: AdditionalData;
|
|
31
|
+
implementation?: object | string;
|
|
32
|
+
lessOptions?: Less.Options;
|
|
33
33
|
};
|
|
34
34
|
export type SassOptions = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
additionalData?: AdditionalData;
|
|
36
|
+
implementation?: object | string;
|
|
37
|
+
sassOptions?: sassOptions<'async'>;
|
|
38
38
|
};
|
|
39
39
|
export type PostcssOptions = {
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
sass: SassOptions;
|
|
52
|
+
less: LessOptions;
|
|
53
|
+
postcss: PostcssOptions;
|
|
54
54
|
}
|
|
55
55
|
export interface StyleConfig {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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 {};
|
package/dist/types/context.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface ModuleContext {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
2
|
+
isTsProject: boolean;
|
|
3
|
+
appDirectory: string;
|
|
4
|
+
srcDirectory: string;
|
|
5
|
+
}
|
package/dist/types/dts.d.ts
CHANGED
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
import type { AliasOption, BaseBuildConfig, Input } from './config';
|
|
2
2
|
export interface GeneratorDtsConfig {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
+
}
|