@hypernym/bundler 0.3.0 → 0.3.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/bin/index.mjs +1 -1
- package/dist/types/index.d.ts +60 -60
- package/package.json +2 -2
package/dist/bin/index.mjs
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { RollupNodeResolveOptions } from '@rollup/plugin-node-resolve';
|
|
|
5
5
|
import { TransformOptions } from 'esbuild';
|
|
6
6
|
import { Options as Options$1 } from 'rollup-plugin-dts';
|
|
7
7
|
|
|
8
|
-
interface
|
|
8
|
+
interface PluginsOptions {
|
|
9
9
|
esbuild?: TransformOptions;
|
|
10
10
|
dts?: Options$1;
|
|
11
11
|
resolve?: RollupNodeResolveOptions | true;
|
|
@@ -66,7 +66,7 @@ interface EntryInput extends EntryBase {
|
|
|
66
66
|
*
|
|
67
67
|
* @default undefined
|
|
68
68
|
*/
|
|
69
|
-
plugins?:
|
|
69
|
+
plugins?: PluginsOptions;
|
|
70
70
|
}
|
|
71
71
|
interface EntryTypes extends EntryBase {
|
|
72
72
|
/**
|
|
@@ -78,10 +78,66 @@ interface EntryTypes extends EntryBase {
|
|
|
78
78
|
*
|
|
79
79
|
* @default undefined
|
|
80
80
|
*/
|
|
81
|
-
plugins?: Pick<
|
|
81
|
+
plugins?: Pick<PluginsOptions, 'dts'>;
|
|
82
82
|
}
|
|
83
83
|
type EntryOptions = EntryInput | EntryTypes;
|
|
84
84
|
|
|
85
|
+
interface Options {
|
|
86
|
+
/**
|
|
87
|
+
* Specifies the bundle's entry points.
|
|
88
|
+
*
|
|
89
|
+
* It allows you to manually set all build entries and adjust options for each one individually.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
*
|
|
93
|
+
* ```ts
|
|
94
|
+
* export default defineConfig({
|
|
95
|
+
* entries: [
|
|
96
|
+
* { input: './src/index.ts' }, // => './dist/index.mjs'
|
|
97
|
+
* { types: './src/types.ts' }, // => './dist/types.d.ts'
|
|
98
|
+
* // ...
|
|
99
|
+
* ]
|
|
100
|
+
* })
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
entries: EntryOptions[];
|
|
104
|
+
/**
|
|
105
|
+
* Specifies the output directory for production bundle.
|
|
106
|
+
*
|
|
107
|
+
* @default 'dist'
|
|
108
|
+
*/
|
|
109
|
+
outDir?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Specifies the module IDs, or regular expressions to match module IDs,
|
|
112
|
+
* that should remain external to the bundle.
|
|
113
|
+
*
|
|
114
|
+
* IDs and regexps from this option are applied globally to all entries.
|
|
115
|
+
*
|
|
116
|
+
* Also, it is possible to define externals individually per entry (`entry.externals`).
|
|
117
|
+
*
|
|
118
|
+
* @default [/^node:/, /^@types/, /^@rollup/, /^@hypernym/, /^rollup/, ...pkg.dependencies]
|
|
119
|
+
*/
|
|
120
|
+
externals?: (string | RegExp)[];
|
|
121
|
+
/**
|
|
122
|
+
* Provides a powerful hooking system to further expand bundling mode.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
*
|
|
126
|
+
* ```ts
|
|
127
|
+
* export default defineConfig({
|
|
128
|
+
* hooks: {
|
|
129
|
+
* 'build:end': async (options, buildStats) => {
|
|
130
|
+
* // ...
|
|
131
|
+
* }
|
|
132
|
+
* }
|
|
133
|
+
* })
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* @default undefined
|
|
137
|
+
*/
|
|
138
|
+
hooks?: HooksOptions;
|
|
139
|
+
}
|
|
140
|
+
|
|
85
141
|
interface BuildLogs {
|
|
86
142
|
level: LogLevel;
|
|
87
143
|
log: RollupLog;
|
|
@@ -232,62 +288,6 @@ interface HooksOptions {
|
|
|
232
288
|
'bundle:end'?: (options?: Options) => void | Promise<void>;
|
|
233
289
|
}
|
|
234
290
|
|
|
235
|
-
interface Options {
|
|
236
|
-
/**
|
|
237
|
-
* Specifies the bundle's entry points.
|
|
238
|
-
*
|
|
239
|
-
* It allows you to manually set all build entries and adjust options for each one individually.
|
|
240
|
-
*
|
|
241
|
-
* @example
|
|
242
|
-
*
|
|
243
|
-
* ```ts
|
|
244
|
-
* export default defineConfig({
|
|
245
|
-
* entries: [
|
|
246
|
-
* { input: './src/index.ts' }, // => './dist/index.mjs'
|
|
247
|
-
* { types: './src/types.ts' }, // => './dist/types.d.ts'
|
|
248
|
-
* // ...
|
|
249
|
-
* ]
|
|
250
|
-
* })
|
|
251
|
-
* ```
|
|
252
|
-
*/
|
|
253
|
-
entries: EntryOptions[];
|
|
254
|
-
/**
|
|
255
|
-
* Specifies the output directory for production bundle.
|
|
256
|
-
*
|
|
257
|
-
* @default 'dist'
|
|
258
|
-
*/
|
|
259
|
-
outDir?: string;
|
|
260
|
-
/**
|
|
261
|
-
* Specifies the module IDs, or regular expressions to match module IDs,
|
|
262
|
-
* that should remain external to the bundle.
|
|
263
|
-
*
|
|
264
|
-
* IDs and regexps from this option are applied globally to all entries.
|
|
265
|
-
*
|
|
266
|
-
* Also, it is possible to define externals individually per entry (`entry.externals`).
|
|
267
|
-
*
|
|
268
|
-
* @default [/^node:/, /^@types/, /^@rollup/, /^@hypernym/, /^rollup/, ...pkg.dependencies]
|
|
269
|
-
*/
|
|
270
|
-
externals?: (string | RegExp)[];
|
|
271
|
-
/**
|
|
272
|
-
* Provides a powerful hooking system to further expand bundling mode.
|
|
273
|
-
*
|
|
274
|
-
* @example
|
|
275
|
-
*
|
|
276
|
-
* ```ts
|
|
277
|
-
* export default defineConfig({
|
|
278
|
-
* hooks: {
|
|
279
|
-
* 'build:end': async (options, buildStats) => {
|
|
280
|
-
* // ...
|
|
281
|
-
* }
|
|
282
|
-
* }
|
|
283
|
-
* })
|
|
284
|
-
* ```
|
|
285
|
-
*
|
|
286
|
-
* @default undefined
|
|
287
|
-
*/
|
|
288
|
-
hooks?: HooksOptions;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
291
|
/**
|
|
292
292
|
* List of global defaults for externals.
|
|
293
293
|
*
|
|
@@ -309,4 +309,4 @@ interface Options {
|
|
|
309
309
|
declare const externals: RegExp[];
|
|
310
310
|
declare function defineConfig(options: Options): Options;
|
|
311
311
|
|
|
312
|
-
export { defineConfig, externals };
|
|
312
|
+
export { type BuildLogs, type BuildStats, type EntryBase, type EntryInput, type EntryOptions, type EntryTypes, type HooksOptions, type Options, type PluginsOptions, defineConfig, externals };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypernym/bundler",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"author": "Hypernym Studio",
|
|
5
5
|
"description": "ESM & TS module bundler.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@rollup/plugin-json": "^6.0.1",
|
|
64
64
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
65
65
|
"@rollup/plugin-replace": "^5.0.4",
|
|
66
|
-
"esbuild": "^0.19.
|
|
66
|
+
"esbuild": "^0.19.5",
|
|
67
67
|
"rollup": "^4.1.4",
|
|
68
68
|
"rollup-plugin-dts": "^6.1.0"
|
|
69
69
|
},
|