@doracli/rollup 0.0.5 → 0.0.6

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.
@@ -1,381 +1,381 @@
1
- import type * as rollup from 'rollup';
2
- import type {
3
- ExternalOption,
4
- InputOption,
5
- OutputOptions,
6
- Plugin,
7
- RollupBuild,
8
- RollupOptions,
9
- RollupOutput,
10
- RollupWatcher,
11
- RollupWatchOptions,
12
- WatcherOptions,
13
- } from 'rollup';
14
- export { RollupBuild, RollupOptions } from 'rollup';
15
- import type { CopyOptions } from 'rollup-plugin-copy';
16
- import type { Options } from 'rollup-plugin-dts';
17
- import type { PostCSSPluginConf } from 'rollup-plugin-postcss';
18
- import type { TPlainObject } from '@cclr/lang';
19
- import type { TOnionFun } from '@cclr/utils';
20
- import type { ConfigCtx } from '@doracli/helper';
21
- import { CompilerBase } from '@doracli/helper';
22
- import type * as _doracli_type from '@doracli/type';
23
- import type { TDoraConfigCommon, TDoraConfigRollup } from '@doracli/type';
24
- import type { RollupAliasOptions } from '@rollup/plugin-alias';
25
- import type { RollupBabelInputPluginOptions } from '@rollup/plugin-babel';
26
- import type { RollupCommonJSOptions } from '@rollup/plugin-commonjs';
27
- import type { RollupJsonOptions } from '@rollup/plugin-json';
28
- import type { RollupNodeResolveOptions } from '@rollup/plugin-node-resolve';
29
-
30
- type TBuildResult = {
31
- rollupBuild: RollupBuild;
32
- outputOptions?: RollupOutput[];
33
- outputOption?: RollupOutput;
34
- };
35
- declare class Compiler extends CompilerBase<
36
- RollupOptions,
37
- {
38
- build: Promise<TBuildResult>;
39
- watch: RollupWatcher;
40
- server: Promise<void>;
41
- }
42
- > {
43
- context: (options: RollupOptions) => Promise<{
44
- rebuild: () => Promise<{
45
- rollupBuild: RollupBuild;
46
- outputOptions: RollupOutput[];
47
- }>;
48
- cancel: () => Promise<void>;
49
- }>;
50
- inOutMap: (inputOutputMap: Record<string, string>) => Promise<{
51
- rollupBuild: RollupBuild;
52
- outputOptions: RollupOutput[];
53
- }>;
54
- input: (input?: string) => Promise<{
55
- output: (output: OutputOptions) => Promise<{
56
- rollupBuild: RollupBuild;
57
- outputOption: RollupOutput;
58
- }>;
59
- }>;
60
- build: (options: RollupOptions) => Promise<{
61
- rollupBuild: RollupBuild;
62
- outputOptions: RollupOutput[];
63
- }>;
64
- watch: (options: RollupWatchOptions) => RollupWatcher;
65
- server: () => Promise<void>;
66
- }
67
-
68
- /** 动作 */
69
- type TAction = 'build' | 'dev' | 'watch';
70
- type TEnvParams = {
71
- /** 开发模式 */
72
- action: TAction;
73
- /** 工作目录,绝对路径 cwd */
74
- workRootDir: string;
75
- };
76
-
77
- type TOutputOptions = OutputOptions;
78
- type TInputOption = InputOption;
79
- type TWatcherOptions = WatcherOptions;
80
- type TExternalOption = ExternalOption;
81
- type TUserExternalOption = {
82
- /**
83
- * 过滤器,判断是否需要包含模块
84
- * @param source 模块名
85
- * @return boolean 返回true表示 - 会被打包进产物
86
- */
87
- filter?: (source: string) => boolean;
88
- externals?: string[] | Record<string, string>;
89
- internals?: string[] | Record<string, string>;
90
- dependencies?: Record<string, string>;
91
- peerDependencies?: Record<string, string>;
92
- devDependencies?: Record<string, string>;
93
- };
94
-
95
- /**
96
- * 获取external配置
97
- * @param envParams 环境参数
98
- * @param options 用户配置的external选项
99
- * @returns TExternalOption
100
- */
101
- declare const getExternal: (
102
- _envParams: TEnvParams,
103
- options?: TUserExternalOption
104
- ) => TExternalOption;
105
-
106
- type TInputParams = string | Record<string, string>;
107
- /**
108
- * 获取入口文件
109
- * @description input 不传,则自动寻找
110
- * @param envParams 环境参数
111
- * @param input 入口文件路径
112
- * @returnscj
113
- */
114
- declare const getInput: (
115
- envParams: TEnvParams,
116
- input?: TInputParams
117
- ) => Promise<TInputOption>;
118
-
119
- /**
120
- * 生成单个output
121
- * @description 如果不配置output,则默认生成cjs格式的output,输出路径为`lib/index.js`
122
- * @description 自动组合完整的file
123
- * @param optionsOutput
124
- * @returns
125
- */
126
- declare const getOutput: (
127
- envParams: TEnvParams,
128
- options?: TOutputOptions
129
- ) => TOutputOptions;
130
-
131
- /**
132
- * 获取别名插件
133
- * @param config 快捷配置
134
- * @param pluginConfig 标准配置
135
- * @returns 别名插件
136
- */
137
- declare const getAliasPlugin: (
138
- config: {
139
- tsConfigPath?: TPlainObject;
140
- alias?: TPlainObject;
141
- },
142
- pluginConfig?: RollupAliasOptions
143
- ) => rollup.Plugin<any>;
144
-
145
- /**
146
- * 获取Babel插件
147
- * @param _config 快捷配置
148
- * @param pluginConfig 标准配置
149
- * @returns Babel插件
150
- */
151
- declare const getBabelPlugin: (
152
- _config: TPlainObject,
153
- pluginConfig?: RollupBabelInputPluginOptions
154
- ) => rollup.Plugin<any>;
155
-
156
- /**
157
- * 获取CommonJS插件
158
- * @description 将 CommonJS 转换成 ES2015 模块供 Rollup 处理
159
- * @param _config
160
- * @param pluginConfig
161
- * @returns
162
- */
163
- declare const getCommonjsPlugin: (
164
- _config: TPlainObject,
165
- pluginConfig?: RollupCommonJSOptions
166
- ) => rollup.Plugin<any>;
167
-
168
- /**
169
- * 获取拷贝插件
170
- * @param config 快捷配置
171
- * @param pluginConfig 标准配置
172
- * @returns 拷贝插件
173
- */
174
- declare const getCopyPlugin: (
175
- config: {
176
- copyList?: TDoraConfigCommon['copy'];
177
- },
178
- pluginConfig?: CopyOptions
179
- ) => rollup.Plugin<any>;
180
-
181
- /**
182
- * 获取 dts 插件
183
- * @param _config
184
- * @param pluginConfig
185
- * @returns
186
- */
187
- declare const getDtsPlugin: (
188
- _config: TPlainObject,
189
- pluginConfig?: Options
190
- ) => rollup.Plugin<any>;
191
-
192
- /**
193
- * 获取Json插件
194
- * @description 允许将 .json 文件作为 ES6 模块导入
195
- * @param _config
196
- * @param pluginConfig
197
- * @returns
198
- */
199
- declare const getJsonPlugin: (
200
- _config: TPlainObject,
201
- pluginConfig?: RollupJsonOptions
202
- ) => rollup.Plugin<any>;
203
-
204
- /**
205
- * 获取代码压缩插件
206
- * @returns Minimize插件
207
- */
208
- declare const getMinimizePlugin: () => rollup.Plugin<any>;
209
-
210
- /**
211
- * 创建Postcss插件
212
- * @param config 快捷配置
213
- * @param pluginConfig 标准配置
214
- * @returns Postcss插件
215
- */
216
- declare const getPostcssPlugin: (
217
- config: {
218
- minimize?: boolean;
219
- output: string;
220
- },
221
- pluginConfig?: PostCSSPluginConf
222
- ) => rollup.Plugin<any>;
223
-
224
- /**
225
- * 获取解析插件
226
- * @param config 快捷配置
227
- * @param pluginConfig 标准配置
228
- * @returns 解析插件
229
- */
230
- declare const getResolvePlugin: (
231
- config: {
232
- extensions?: string[];
233
- },
234
- pluginConfig?: RollupNodeResolveOptions
235
- ) => rollup.Plugin<any>;
236
-
237
- /**
238
- * 获取Node环境下的插件集合
239
- * @param config 快捷配置
240
- * @returns
241
- */
242
- declare const getNodePlugins: (config: {
243
- minimize?: boolean;
244
- alias?: Record<string, string>;
245
- copyList?: TDoraConfigCommon['copy'];
246
- }) => rollup.Plugin<any>[];
247
-
248
- /**
249
- * 获取Node环境下的插件集合
250
- * @param config 快捷配置
251
- * @returns
252
- */
253
- declare const getReactPlugins: (config: {
254
- minimize?: boolean;
255
- cssOutput?: string;
256
- alias?: Record<string, string>;
257
- copy?: TDoraConfigCommon['copy'];
258
- }) => Promise<Plugin<any>[]>;
259
-
260
- /**
261
- * 获取watch配置
262
- * @param options
263
- * @returns
264
- */
265
- declare const getWatch: (
266
- envParams: TEnvParams,
267
- options?: TWatcherOptions
268
- ) => TWatcherOptions;
269
-
270
- declare class Ctx {
271
- configCtx: ConfigCtx;
272
- rollupOptions: RollupOptions;
273
- rollupOutputList: TOutputOptions[];
274
- envParams: TEnvParams;
275
- constructor(configCtx: ConfigCtx);
276
- updateEnvParams(argv: Partial<TEnvParams>): void;
277
- updateRollupOptions(options: Partial<RollupOptions>): void;
278
- updateRollupOutputList(list: TOutputOptions[], force?: boolean): void;
279
- getDoraConfig(): _doracli_type.TDoraConfig;
280
- geTDoraConfigRollup(): TDoraConfigRollup;
281
- }
282
-
283
- declare const envParamsMw: (envParams: TEnvParams) => TOnionFun<Ctx>;
284
-
285
- declare const rollupExternalMw: () => TOnionFun<Ctx>;
286
- declare const rollupDtsExternalMw: () => TOnionFun<Ctx>;
287
-
288
- declare const rollupInputMw: () => TOnionFun<Ctx>;
289
- declare const rollupOutputListMw: () => TOnionFun<Ctx>;
290
- declare const rollupInoutMw: () => TOnionFun<Ctx>;
291
- declare const rollupWatchOutputMw: () => TOnionFun<Ctx>;
292
- declare const rollupDtsInoutMw: () => TOnionFun<Ctx>;
293
-
294
- declare const insertTsMw: () => TOnionFun<Ctx>;
295
-
296
- declare const rollupReactPluginMw: () => TOnionFun<Ctx>;
297
- declare const rollupNodePluginMw: () => TOnionFun<Ctx>;
298
- declare const rollupDtsPluginMw: () => TOnionFun<Ctx>;
299
-
300
- declare const rollupWatchMw: () => TOnionFun<Ctx>;
301
-
302
- /**
303
- * 获取运行时输出配置
304
- * @param output
305
- * @param isMultiple
306
- * @param workRootDir
307
- * @returns
308
- */
309
- declare const getOutputRuntime: (
310
- output: TOutputOptions,
311
- isMultiple: boolean,
312
- workRootDir: string
313
- ) => TOutputOptions;
314
-
315
- /**
316
- * 从rollup配置中,获取第一个input
317
- * @param inputOrigin
318
- * @returns
319
- */
320
- declare const getFirstInput: (inputOrigin: TInputOption) =>
321
- | {
322
- path: string;
323
- name: string;
324
- }
325
- | undefined;
326
-
327
- declare const rollupWatchLog: (watcher: RollupWatcher) => void;
328
- declare function handleError(error: any, recover?: boolean): void;
329
-
330
- declare const mergeRollupOptions: <T extends Partial<RollupOptions>>(
331
- first: T,
332
- second: T
333
- ) => T;
334
-
335
- export {
336
- Compiler,
337
- Ctx,
338
- envParamsMw,
339
- getAliasPlugin,
340
- getBabelPlugin,
341
- getCommonjsPlugin,
342
- getCopyPlugin,
343
- getDtsPlugin,
344
- getExternal,
345
- getFirstInput,
346
- getInput,
347
- getJsonPlugin,
348
- getMinimizePlugin,
349
- getNodePlugins,
350
- getOutput,
351
- getOutputRuntime,
352
- getPostcssPlugin,
353
- getReactPlugins,
354
- getResolvePlugin,
355
- getWatch,
356
- handleError,
357
- insertTsMw,
358
- mergeRollupOptions,
359
- rollupDtsExternalMw,
360
- rollupDtsInoutMw,
361
- rollupDtsPluginMw,
362
- rollupExternalMw,
363
- rollupInoutMw,
364
- rollupInputMw,
365
- rollupNodePluginMw,
366
- rollupOutputListMw,
367
- rollupReactPluginMw,
368
- rollupWatchLog,
369
- rollupWatchMw,
370
- rollupWatchOutputMw,
371
- };
372
- export type {
373
- TAction,
374
- TBuildResult,
375
- TEnvParams,
376
- TExternalOption,
377
- TInputOption,
378
- TOutputOptions,
379
- TUserExternalOption,
380
- TWatcherOptions,
381
- };
1
+ import type * as rollup from 'rollup';
2
+ import type {
3
+ ExternalOption,
4
+ InputOption,
5
+ OutputOptions,
6
+ Plugin,
7
+ RollupBuild,
8
+ RollupOptions,
9
+ RollupOutput,
10
+ RollupWatcher,
11
+ RollupWatchOptions,
12
+ WatcherOptions,
13
+ } from 'rollup';
14
+ export { RollupBuild, RollupOptions } from 'rollup';
15
+ import type { CopyOptions } from 'rollup-plugin-copy';
16
+ import type { Options } from 'rollup-plugin-dts';
17
+ import type { PostCSSPluginConf } from 'rollup-plugin-postcss';
18
+ import type { TPlainObject } from '@cclr/lang';
19
+ import type { TOnionFun } from '@cclr/utils';
20
+ import type { ConfigCtx } from '@doracli/helper';
21
+ import { CompilerBase } from '@doracli/helper';
22
+ import type * as _doracli_type from '@doracli/type';
23
+ import type { TDoraConfigCommon, TDoraConfigRollup } from '@doracli/type';
24
+ import type { RollupAliasOptions } from '@rollup/plugin-alias';
25
+ import type { RollupBabelInputPluginOptions } from '@rollup/plugin-babel';
26
+ import type { RollupCommonJSOptions } from '@rollup/plugin-commonjs';
27
+ import type { RollupJsonOptions } from '@rollup/plugin-json';
28
+ import type { RollupNodeResolveOptions } from '@rollup/plugin-node-resolve';
29
+
30
+ type TBuildResult = {
31
+ rollupBuild: RollupBuild;
32
+ outputOptions?: RollupOutput[];
33
+ outputOption?: RollupOutput;
34
+ };
35
+ declare class Compiler extends CompilerBase<
36
+ RollupOptions,
37
+ {
38
+ build: Promise<TBuildResult>;
39
+ watch: RollupWatcher;
40
+ server: Promise<void>;
41
+ }
42
+ > {
43
+ context: (options: RollupOptions) => Promise<{
44
+ rebuild: () => Promise<{
45
+ rollupBuild: RollupBuild;
46
+ outputOptions: RollupOutput[];
47
+ }>;
48
+ cancel: () => Promise<void>;
49
+ }>;
50
+ inOutMap: (inputOutputMap: Record<string, string>) => Promise<{
51
+ rollupBuild: RollupBuild;
52
+ outputOptions: RollupOutput[];
53
+ }>;
54
+ input: (input?: string) => Promise<{
55
+ output: (output: OutputOptions) => Promise<{
56
+ rollupBuild: RollupBuild;
57
+ outputOption: RollupOutput;
58
+ }>;
59
+ }>;
60
+ build: (options: RollupOptions) => Promise<{
61
+ rollupBuild: RollupBuild;
62
+ outputOptions: RollupOutput[];
63
+ }>;
64
+ watch: (options: RollupWatchOptions) => RollupWatcher;
65
+ server: () => Promise<void>;
66
+ }
67
+
68
+ /** 动作 */
69
+ type TAction = 'build' | 'dev' | 'watch';
70
+ type TEnvParams = {
71
+ /** 开发模式 */
72
+ action: TAction;
73
+ /** 工作目录,绝对路径 cwd */
74
+ workRootDir: string;
75
+ };
76
+
77
+ type TOutputOptions = OutputOptions;
78
+ type TInputOption = InputOption;
79
+ type TWatcherOptions = WatcherOptions;
80
+ type TExternalOption = ExternalOption;
81
+ type TUserExternalOption = {
82
+ /**
83
+ * 过滤器,判断是否需要包含模块
84
+ * @param source 模块名
85
+ * @return boolean 返回true表示 - 会被打包进产物
86
+ */
87
+ filter?: (source: string) => boolean;
88
+ externals?: string[] | Record<string, string>;
89
+ internals?: string[] | Record<string, string>;
90
+ dependencies?: Record<string, string>;
91
+ peerDependencies?: Record<string, string>;
92
+ devDependencies?: Record<string, string>;
93
+ };
94
+
95
+ /**
96
+ * 获取external配置
97
+ * @param envParams 环境参数
98
+ * @param options 用户配置的external选项
99
+ * @returns TExternalOption
100
+ */
101
+ declare const getExternal: (
102
+ _envParams: TEnvParams,
103
+ options?: TUserExternalOption
104
+ ) => TExternalOption;
105
+
106
+ type TInputParams = string | Record<string, string>;
107
+ /**
108
+ * 获取入口文件
109
+ * @description input 不传,则自动寻找
110
+ * @param envParams 环境参数
111
+ * @param input 入口文件路径
112
+ * @returnscj
113
+ */
114
+ declare const getInput: (
115
+ envParams: TEnvParams,
116
+ input?: TInputParams
117
+ ) => Promise<TInputOption>;
118
+
119
+ /**
120
+ * 生成单个output
121
+ * @description 如果不配置output,则默认生成cjs格式的output,输出路径为`lib/index.js`
122
+ * @description 自动组合完整的file
123
+ * @param optionsOutput
124
+ * @returns
125
+ */
126
+ declare const getOutput: (
127
+ envParams: TEnvParams,
128
+ options?: TOutputOptions
129
+ ) => TOutputOptions;
130
+
131
+ /**
132
+ * 获取别名插件
133
+ * @param config 快捷配置
134
+ * @param pluginConfig 标准配置
135
+ * @returns 别名插件
136
+ */
137
+ declare const getAliasPlugin: (
138
+ config: {
139
+ tsConfigPath?: TPlainObject;
140
+ alias?: TPlainObject;
141
+ },
142
+ pluginConfig?: RollupAliasOptions
143
+ ) => rollup.Plugin<any>;
144
+
145
+ /**
146
+ * 获取Babel插件
147
+ * @param _config 快捷配置
148
+ * @param pluginConfig 标准配置
149
+ * @returns Babel插件
150
+ */
151
+ declare const getBabelPlugin: (
152
+ _config: TPlainObject,
153
+ pluginConfig?: RollupBabelInputPluginOptions
154
+ ) => rollup.Plugin<any>;
155
+
156
+ /**
157
+ * 获取CommonJS插件
158
+ * @description 将 CommonJS 转换成 ES2015 模块供 Rollup 处理
159
+ * @param _config
160
+ * @param pluginConfig
161
+ * @returns
162
+ */
163
+ declare const getCommonjsPlugin: (
164
+ _config: TPlainObject,
165
+ pluginConfig?: RollupCommonJSOptions
166
+ ) => rollup.Plugin<any>;
167
+
168
+ /**
169
+ * 获取拷贝插件
170
+ * @param config 快捷配置
171
+ * @param pluginConfig 标准配置
172
+ * @returns 拷贝插件
173
+ */
174
+ declare const getCopyPlugin: (
175
+ config: {
176
+ copyList?: TDoraConfigCommon['copy'];
177
+ },
178
+ pluginConfig?: CopyOptions
179
+ ) => rollup.Plugin<any>;
180
+
181
+ /**
182
+ * 获取 dts 插件
183
+ * @param _config
184
+ * @param pluginConfig
185
+ * @returns
186
+ */
187
+ declare const getDtsPlugin: (
188
+ _config: TPlainObject,
189
+ pluginConfig?: Options
190
+ ) => rollup.Plugin<any>;
191
+
192
+ /**
193
+ * 获取Json插件
194
+ * @description 允许将 .json 文件作为 ES6 模块导入
195
+ * @param _config
196
+ * @param pluginConfig
197
+ * @returns
198
+ */
199
+ declare const getJsonPlugin: (
200
+ _config: TPlainObject,
201
+ pluginConfig?: RollupJsonOptions
202
+ ) => rollup.Plugin<any>;
203
+
204
+ /**
205
+ * 获取代码压缩插件
206
+ * @returns Minimize插件
207
+ */
208
+ declare const getMinimizePlugin: () => rollup.Plugin<any>;
209
+
210
+ /**
211
+ * 创建Postcss插件
212
+ * @param config 快捷配置
213
+ * @param pluginConfig 标准配置
214
+ * @returns Postcss插件
215
+ */
216
+ declare const getPostcssPlugin: (
217
+ config: {
218
+ minimize?: boolean;
219
+ output: string;
220
+ },
221
+ pluginConfig?: PostCSSPluginConf
222
+ ) => rollup.Plugin<any>;
223
+
224
+ /**
225
+ * 获取解析插件
226
+ * @param config 快捷配置
227
+ * @param pluginConfig 标准配置
228
+ * @returns 解析插件
229
+ */
230
+ declare const getResolvePlugin: (
231
+ config: {
232
+ extensions?: string[];
233
+ },
234
+ pluginConfig?: RollupNodeResolveOptions
235
+ ) => rollup.Plugin<any>;
236
+
237
+ /**
238
+ * 获取Node环境下的插件集合
239
+ * @param config 快捷配置
240
+ * @returns
241
+ */
242
+ declare const getNodePlugins: (config: {
243
+ minimize?: boolean;
244
+ alias?: Record<string, string>;
245
+ copyList?: TDoraConfigCommon['copy'];
246
+ }) => rollup.Plugin<any>[];
247
+
248
+ /**
249
+ * 获取Node环境下的插件集合
250
+ * @param config 快捷配置
251
+ * @returns
252
+ */
253
+ declare const getReactPlugins: (config: {
254
+ minimize?: boolean;
255
+ cssOutput?: string;
256
+ alias?: Record<string, string>;
257
+ copy?: TDoraConfigCommon['copy'];
258
+ }) => Promise<Plugin<any>[]>;
259
+
260
+ /**
261
+ * 获取watch配置
262
+ * @param options
263
+ * @returns
264
+ */
265
+ declare const getWatch: (
266
+ envParams: TEnvParams,
267
+ options?: TWatcherOptions
268
+ ) => TWatcherOptions;
269
+
270
+ declare class Ctx {
271
+ configCtx: ConfigCtx;
272
+ rollupOptions: RollupOptions;
273
+ rollupOutputList: TOutputOptions[];
274
+ envParams: TEnvParams;
275
+ constructor(configCtx: ConfigCtx);
276
+ updateEnvParams(argv: Partial<TEnvParams>): void;
277
+ updateRollupOptions(options: Partial<RollupOptions>): void;
278
+ updateRollupOutputList(list: TOutputOptions[], force?: boolean): void;
279
+ getDoraConfig(): _doracli_type.TDoraConfig;
280
+ geTDoraConfigRollup(): TDoraConfigRollup;
281
+ }
282
+
283
+ declare const envParamsMw: (envParams: TEnvParams) => TOnionFun<Ctx>;
284
+
285
+ declare const rollupExternalMw: () => TOnionFun<Ctx>;
286
+ declare const rollupDtsExternalMw: () => TOnionFun<Ctx>;
287
+
288
+ declare const rollupInputMw: () => TOnionFun<Ctx>;
289
+ declare const rollupOutputListMw: () => TOnionFun<Ctx>;
290
+ declare const rollupInoutMw: () => TOnionFun<Ctx>;
291
+ declare const rollupWatchOutputMw: () => TOnionFun<Ctx>;
292
+ declare const rollupDtsInoutMw: () => TOnionFun<Ctx>;
293
+
294
+ declare const insertTsMw: () => TOnionFun<Ctx>;
295
+
296
+ declare const rollupReactPluginMw: () => TOnionFun<Ctx>;
297
+ declare const rollupNodePluginMw: () => TOnionFun<Ctx>;
298
+ declare const rollupDtsPluginMw: () => TOnionFun<Ctx>;
299
+
300
+ declare const rollupWatchMw: () => TOnionFun<Ctx>;
301
+
302
+ /**
303
+ * 获取运行时输出配置
304
+ * @param output
305
+ * @param isMultiple
306
+ * @param workRootDir
307
+ * @returns
308
+ */
309
+ declare const getOutputRuntime: (
310
+ output: TOutputOptions,
311
+ isMultiple: boolean,
312
+ workRootDir: string
313
+ ) => TOutputOptions;
314
+
315
+ /**
316
+ * 从rollup配置中,获取第一个input
317
+ * @param inputOrigin
318
+ * @returns
319
+ */
320
+ declare const getFirstInput: (inputOrigin: TInputOption) =>
321
+ | {
322
+ path: string;
323
+ name: string;
324
+ }
325
+ | undefined;
326
+
327
+ declare const rollupWatchLog: (watcher: RollupWatcher) => void;
328
+ declare function handleError(error: any, recover?: boolean): void;
329
+
330
+ declare const mergeRollupOptions: <T extends Partial<RollupOptions>>(
331
+ first: T,
332
+ second: T
333
+ ) => T;
334
+
335
+ export {
336
+ Compiler,
337
+ Ctx,
338
+ envParamsMw,
339
+ getAliasPlugin,
340
+ getBabelPlugin,
341
+ getCommonjsPlugin,
342
+ getCopyPlugin,
343
+ getDtsPlugin,
344
+ getExternal,
345
+ getFirstInput,
346
+ getInput,
347
+ getJsonPlugin,
348
+ getMinimizePlugin,
349
+ getNodePlugins,
350
+ getOutput,
351
+ getOutputRuntime,
352
+ getPostcssPlugin,
353
+ getReactPlugins,
354
+ getResolvePlugin,
355
+ getWatch,
356
+ handleError,
357
+ insertTsMw,
358
+ mergeRollupOptions,
359
+ rollupDtsExternalMw,
360
+ rollupDtsInoutMw,
361
+ rollupDtsPluginMw,
362
+ rollupExternalMw,
363
+ rollupInoutMw,
364
+ rollupInputMw,
365
+ rollupNodePluginMw,
366
+ rollupOutputListMw,
367
+ rollupReactPluginMw,
368
+ rollupWatchLog,
369
+ rollupWatchMw,
370
+ rollupWatchOutputMw,
371
+ };
372
+ export type {
373
+ TAction,
374
+ TBuildResult,
375
+ TEnvParams,
376
+ TExternalOption,
377
+ TInputOption,
378
+ TOutputOptions,
379
+ TUserExternalOption,
380
+ TWatcherOptions,
381
+ };