@qubit-ltd/rollup-builder 1.8.4

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 (49) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +335 -0
  3. package/README.zh_CN.md +288 -0
  4. package/dist/rollup-builder.cjs +793 -0
  5. package/dist/rollup-builder.cjs.map +1 -0
  6. package/dist/rollup-builder.min.cjs +1 -0
  7. package/dist/rollup-builder.min.cjs.map +1 -0
  8. package/dist/rollup-builder.min.mjs +1 -0
  9. package/dist/rollup-builder.min.mjs.map +1 -0
  10. package/dist/rollup-builder.mjs +791 -0
  11. package/dist/rollup-builder.mjs.map +1 -0
  12. package/doc/api/fonts/OpenSans-Bold-webfont.eot +0 -0
  13. package/doc/api/fonts/OpenSans-Bold-webfont.svg +1838 -0
  14. package/doc/api/fonts/OpenSans-Bold-webfont.woff +0 -0
  15. package/doc/api/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  16. package/doc/api/fonts/OpenSans-BoldItalic-webfont.svg +1838 -0
  17. package/doc/api/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  18. package/doc/api/fonts/OpenSans-Italic-webfont.eot +0 -0
  19. package/doc/api/fonts/OpenSans-Italic-webfont.svg +1838 -0
  20. package/doc/api/fonts/OpenSans-Italic-webfont.woff +0 -0
  21. package/doc/api/fonts/OpenSans-Light-webfont.eot +0 -0
  22. package/doc/api/fonts/OpenSans-Light-webfont.svg +1839 -0
  23. package/doc/api/fonts/OpenSans-Light-webfont.woff +0 -0
  24. package/doc/api/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  25. package/doc/api/fonts/OpenSans-LightItalic-webfont.svg +1843 -0
  26. package/doc/api/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  27. package/doc/api/fonts/OpenSans-Regular-webfont.eot +0 -0
  28. package/doc/api/fonts/OpenSans-Regular-webfont.svg +1839 -0
  29. package/doc/api/fonts/OpenSans-Regular-webfont.woff +0 -0
  30. package/doc/api/fonts/OpenSans-Semibold-webfont.eot +0 -0
  31. package/doc/api/fonts/OpenSans-Semibold-webfont.svg +1838 -0
  32. package/doc/api/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  33. package/doc/api/fonts/OpenSans-Semibold-webfont.woff +0 -0
  34. package/doc/api/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  35. package/doc/api/fonts/OpenSans-SemiboldItalic-webfont.svg +1838 -0
  36. package/doc/api/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  37. package/doc/api/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  38. package/doc/api/global.html +2913 -0
  39. package/doc/api/index.html +418 -0
  40. package/doc/api/scripts/linenumber.js +34 -0
  41. package/doc/api/scripts/prettify/Apache-License-2.0.txt +202 -0
  42. package/doc/api/scripts/prettify/lang-css.js +2 -0
  43. package/doc/api/scripts/prettify/prettify.js +28 -0
  44. package/doc/api/styles/jsdoc-default.css +699 -0
  45. package/doc/api/styles/prettify-jsdoc.css +120 -0
  46. package/doc/api/styles/prettify-tomorrow.css +141 -0
  47. package/doc/rollup-builder.min.visualization.html +4842 -0
  48. package/doc/rollup-builder.visualization.html +4842 -0
  49. package/package.json +85 -0
@@ -0,0 +1,2913 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <title>Global - Documentation</title>
7
+
8
+ <script src="scripts/prettify/prettify.js"></script>
9
+ <script src="scripts/prettify/lang-css.js"></script>
10
+ <!--[if lt IE 9]>
11
+ <script src="https://cdn.bootcdn.net/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12
+ <![endif]-->
13
+ <link type="text/css" rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
16
+ </head>
17
+ <body>
18
+
19
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
20
+ <label for="nav-trigger" class="navicon-button x">
21
+ <div class="navicon"></div>
22
+ </label>
23
+
24
+ <label for="nav-trigger" class="overlay"></label>
25
+
26
+ <nav>
27
+ <li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#configAliasPlugin">configAliasPlugin</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#configAnalyzerPlugin">configAnalyzerPlugin</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#configBabelPlugin">configBabelPlugin</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#configCommonJsPlugin">configCommonJsPlugin</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#configNodeResolvePlugin">configNodeResolvePlugin</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#configTerserPlugin">configTerserPlugin</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#configVisualizerPlugin">configVisualizerPlugin</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#getRollupExternal">getRollupExternal</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#getRollupOutput">getRollupOutput</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#getRollupPlugins">getRollupPlugins</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#rollupBuilder">rollupBuilder</a></span></li>
28
+ </nav>
29
+
30
+ <div id="main">
31
+
32
+ <h1 class="page-title">Global</h1>
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+ <section>
41
+
42
+ <header>
43
+
44
+ <h2>
45
+
46
+ </h2>
47
+
48
+
49
+ </header>
50
+
51
+ <article>
52
+ <div class="container-overview">
53
+
54
+
55
+
56
+
57
+
58
+
59
+ <dl class="details">
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+ </dl>
93
+
94
+
95
+
96
+
97
+ </div>
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <h3 class="subsection-title">Methods</h3>
113
+
114
+
115
+
116
+ <div class="section-method">
117
+
118
+
119
+
120
+
121
+ <h4 class="name" id="configAliasPlugin"><span class="type-signature"></span>configAliasPlugin<span class="signature">(format, importMetaUrl, options, plugins)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
122
+
123
+
124
+
125
+
126
+
127
+
128
+ <div class="description">
129
+ <p>Configures the <code>@rollup/plugin-alias</code> plugin.</p>
130
+ </div>
131
+
132
+
133
+
134
+
135
+
136
+ <dl class="details">
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+ <dt class="tag-author">Author:</dt>
156
+ <dd class="tag-author">
157
+ <ul>
158
+ <li>Haixing Hu</li>
159
+ </ul>
160
+ </dd>
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+ <dt class="tag-see">See:</dt>
175
+ <dd class="tag-see">
176
+ <ul>
177
+ <li><a href="https://www.npmjs.com/package/@rollup/plugin-alias">https://www.npmjs.com/package/@rollup/plugin-alias</a></li>
178
+ </ul>
179
+ </dd>
180
+
181
+
182
+
183
+ </dl>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+ <h5>Parameters:</h5>
194
+
195
+
196
+ <table class="params">
197
+ <thead>
198
+ <tr>
199
+
200
+ <th>Name</th>
201
+
202
+
203
+ <th>Type</th>
204
+
205
+
206
+
207
+
208
+
209
+ <th class="last">Description</th>
210
+ </tr>
211
+ </thead>
212
+
213
+ <tbody>
214
+
215
+
216
+ <tr>
217
+
218
+ <td class="name"><code>format</code></td>
219
+
220
+
221
+ <td class="type">
222
+
223
+
224
+ <span class="param-type"><code>string</code></span>
225
+
226
+
227
+
228
+ </td>
229
+
230
+
231
+
232
+
233
+
234
+ <td class="description last">
235
+ <p>The format of the library.</p>
236
+
237
+ </td>
238
+ </tr>
239
+
240
+
241
+
242
+ <tr>
243
+
244
+ <td class="name"><code>importMetaUrl</code></td>
245
+
246
+
247
+ <td class="type">
248
+
249
+
250
+ <span class="param-type"><code>string</code></span>
251
+
252
+
253
+
254
+ </td>
255
+
256
+
257
+
258
+
259
+
260
+ <td class="description last">
261
+ <p>The URL of the <code>import.meta</code> of the caller module.</p>
262
+
263
+ </td>
264
+ </tr>
265
+
266
+
267
+
268
+ <tr>
269
+
270
+ <td class="name"><code>options</code></td>
271
+
272
+
273
+ <td class="type">
274
+
275
+
276
+ <span class="param-type"><code>object</code></span>
277
+
278
+
279
+
280
+ </td>
281
+
282
+
283
+
284
+
285
+
286
+ <td class="description last">
287
+ <p>The additional options for building the library.</p>
288
+
289
+ </td>
290
+ </tr>
291
+
292
+
293
+
294
+ <tr>
295
+
296
+ <td class="name"><code>plugins</code></td>
297
+
298
+
299
+ <td class="type">
300
+
301
+
302
+ <span class="param-type"><code>Array.&lt;Object></code></span>
303
+
304
+
305
+
306
+ </td>
307
+
308
+
309
+
310
+
311
+
312
+ <td class="description last">
313
+ <p>The Rollup plugins array.</p>
314
+
315
+ </td>
316
+ </tr>
317
+
318
+
319
+ </tbody>
320
+ </table>
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+ <div class="section-returns">
338
+ <h5>Returns:</h5>
339
+
340
+
341
+
342
+ <dl class="param-type">
343
+ <dt>
344
+ Type:
345
+ </dt>
346
+ <dd>
347
+
348
+ <span class="param-type"><code>Array.&lt;Object></code></span>
349
+
350
+
351
+ </dd>
352
+ </dl>
353
+
354
+
355
+ <div class="param-desc">
356
+ <p>The modified Rollup plugins array.</p>
357
+ </div>
358
+
359
+
360
+ </div>
361
+
362
+
363
+
364
+
365
+
366
+ </div>
367
+
368
+
369
+ <div class="section-method">
370
+
371
+
372
+
373
+
374
+ <h4 class="name" id="configAnalyzerPlugin"><span class="type-signature"></span>configAnalyzerPlugin<span class="signature">(format, importMetaUrl, options, plugins)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
375
+
376
+
377
+
378
+
379
+
380
+
381
+ <div class="description">
382
+ <p>Configures the <code>rollup-plugin-analyzer</code> plugin.</p>
383
+ </div>
384
+
385
+
386
+
387
+
388
+
389
+ <dl class="details">
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+ <dt class="tag-author">Author:</dt>
409
+ <dd class="tag-author">
410
+ <ul>
411
+ <li>Haixing Hu</li>
412
+ </ul>
413
+ </dd>
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+ <dt class="tag-see">See:</dt>
428
+ <dd class="tag-see">
429
+ <ul>
430
+ <li><a href="https://www.npmjs.com/package/rollup-plugin-analyzer">https://www.npmjs.com/package/rollup-plugin-analyzer</a></li>
431
+ </ul>
432
+ </dd>
433
+
434
+
435
+
436
+ </dl>
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+ <h5>Parameters:</h5>
447
+
448
+
449
+ <table class="params">
450
+ <thead>
451
+ <tr>
452
+
453
+ <th>Name</th>
454
+
455
+
456
+ <th>Type</th>
457
+
458
+
459
+
460
+
461
+
462
+ <th class="last">Description</th>
463
+ </tr>
464
+ </thead>
465
+
466
+ <tbody>
467
+
468
+
469
+ <tr>
470
+
471
+ <td class="name"><code>format</code></td>
472
+
473
+
474
+ <td class="type">
475
+
476
+
477
+ <span class="param-type"><code>string</code></span>
478
+
479
+
480
+
481
+ </td>
482
+
483
+
484
+
485
+
486
+
487
+ <td class="description last">
488
+ <p>The format of the library.</p>
489
+
490
+ </td>
491
+ </tr>
492
+
493
+
494
+
495
+ <tr>
496
+
497
+ <td class="name"><code>importMetaUrl</code></td>
498
+
499
+
500
+ <td class="type">
501
+
502
+
503
+ <span class="param-type"><code>string</code></span>
504
+
505
+
506
+
507
+ </td>
508
+
509
+
510
+
511
+
512
+
513
+ <td class="description last">
514
+ <p>The URL of the <code>import.meta</code> of the caller module.</p>
515
+
516
+ </td>
517
+ </tr>
518
+
519
+
520
+
521
+ <tr>
522
+
523
+ <td class="name"><code>options</code></td>
524
+
525
+
526
+ <td class="type">
527
+
528
+
529
+ <span class="param-type"><code>object</code></span>
530
+
531
+
532
+
533
+ </td>
534
+
535
+
536
+
537
+
538
+
539
+ <td class="description last">
540
+ <p>The additional options for building the library.</p>
541
+
542
+ </td>
543
+ </tr>
544
+
545
+
546
+
547
+ <tr>
548
+
549
+ <td class="name"><code>plugins</code></td>
550
+
551
+
552
+ <td class="type">
553
+
554
+
555
+ <span class="param-type"><code>Array</code></span>
556
+
557
+
558
+
559
+ </td>
560
+
561
+
562
+
563
+
564
+
565
+ <td class="description last">
566
+ <p>The array of Rollup plugins.</p>
567
+
568
+ </td>
569
+ </tr>
570
+
571
+
572
+ </tbody>
573
+ </table>
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+ <div class="section-returns">
591
+ <h5>Returns:</h5>
592
+
593
+
594
+
595
+ <dl class="param-type">
596
+ <dt>
597
+ Type:
598
+ </dt>
599
+ <dd>
600
+
601
+ <span class="param-type"><code>Array.&lt;Object></code></span>
602
+
603
+
604
+ </dd>
605
+ </dl>
606
+
607
+
608
+ <div class="param-desc">
609
+ <p>The modified Rollup plugins array.</p>
610
+ </div>
611
+
612
+
613
+ </div>
614
+
615
+
616
+
617
+
618
+
619
+ </div>
620
+
621
+
622
+ <div class="section-method">
623
+
624
+
625
+
626
+
627
+ <h4 class="name" id="configBabelPlugin"><span class="type-signature"></span>configBabelPlugin<span class="signature">(format, importMetaUrl, options, plugins)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
628
+
629
+
630
+
631
+
632
+
633
+
634
+ <div class="description">
635
+ <p>Configures the <code>@rollup/plugin-babel</code> plugin.</p>
636
+ </div>
637
+
638
+
639
+
640
+
641
+
642
+ <dl class="details">
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+ <dt class="tag-author">Author:</dt>
662
+ <dd class="tag-author">
663
+ <ul>
664
+ <li>Haixing Hu</li>
665
+ </ul>
666
+ </dd>
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+ <dt class="tag-see">See:</dt>
681
+ <dd class="tag-see">
682
+ <ul>
683
+ <li><a href="https://www.npmjs.com/package/@rollup/plugin-babel">https://www.npmjs.com/package/@rollup/plugin-babel</a></li>
684
+ </ul>
685
+ </dd>
686
+
687
+
688
+
689
+ </dl>
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+ <h5>Parameters:</h5>
700
+
701
+
702
+ <table class="params">
703
+ <thead>
704
+ <tr>
705
+
706
+ <th>Name</th>
707
+
708
+
709
+ <th>Type</th>
710
+
711
+
712
+
713
+
714
+
715
+ <th class="last">Description</th>
716
+ </tr>
717
+ </thead>
718
+
719
+ <tbody>
720
+
721
+
722
+ <tr>
723
+
724
+ <td class="name"><code>format</code></td>
725
+
726
+
727
+ <td class="type">
728
+
729
+
730
+ <span class="param-type"><code>string</code></span>
731
+
732
+
733
+
734
+ </td>
735
+
736
+
737
+
738
+
739
+
740
+ <td class="description last">
741
+ <p>The format of the library.</p>
742
+
743
+ </td>
744
+ </tr>
745
+
746
+
747
+
748
+ <tr>
749
+
750
+ <td class="name"><code>importMetaUrl</code></td>
751
+
752
+
753
+ <td class="type">
754
+
755
+
756
+ <span class="param-type"><code>string</code></span>
757
+
758
+
759
+
760
+ </td>
761
+
762
+
763
+
764
+
765
+
766
+ <td class="description last">
767
+ <p>The URL of the <code>import.meta</code> of the caller module.</p>
768
+
769
+ </td>
770
+ </tr>
771
+
772
+
773
+
774
+ <tr>
775
+
776
+ <td class="name"><code>options</code></td>
777
+
778
+
779
+ <td class="type">
780
+
781
+
782
+ <span class="param-type"><code>object</code></span>
783
+
784
+
785
+
786
+ </td>
787
+
788
+
789
+
790
+
791
+
792
+ <td class="description last">
793
+ <p>The additional options for building the library.</p>
794
+
795
+ </td>
796
+ </tr>
797
+
798
+
799
+
800
+ <tr>
801
+
802
+ <td class="name"><code>plugins</code></td>
803
+
804
+
805
+ <td class="type">
806
+
807
+
808
+ <span class="param-type"><code>Array</code></span>
809
+
810
+
811
+
812
+ </td>
813
+
814
+
815
+
816
+
817
+
818
+ <td class="description last">
819
+ <p>The array of Rollup plugins.</p>
820
+
821
+ </td>
822
+ </tr>
823
+
824
+
825
+ </tbody>
826
+ </table>
827
+
828
+
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+
838
+
839
+
840
+
841
+
842
+
843
+ <div class="section-returns">
844
+ <h5>Returns:</h5>
845
+
846
+
847
+
848
+ <dl class="param-type">
849
+ <dt>
850
+ Type:
851
+ </dt>
852
+ <dd>
853
+
854
+ <span class="param-type"><code>Array.&lt;Object></code></span>
855
+
856
+
857
+ </dd>
858
+ </dl>
859
+
860
+
861
+ <div class="param-desc">
862
+ <p>The modified Rollup plugins array.</p>
863
+ </div>
864
+
865
+
866
+ </div>
867
+
868
+
869
+
870
+
871
+
872
+ </div>
873
+
874
+
875
+ <div class="section-method">
876
+
877
+
878
+
879
+
880
+ <h4 class="name" id="configCommonJsPlugin"><span class="type-signature"></span>configCommonJsPlugin<span class="signature">(format, importMetaUrl, options, plugins)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
881
+
882
+
883
+
884
+
885
+
886
+
887
+ <div class="description">
888
+ <p>Configures the <code>@rollup/plugin-commonjs</code> plugin.</p>
889
+ </div>
890
+
891
+
892
+
893
+
894
+
895
+ <dl class="details">
896
+
897
+
898
+
899
+
900
+
901
+
902
+
903
+
904
+
905
+
906
+
907
+
908
+
909
+
910
+
911
+
912
+
913
+
914
+ <dt class="tag-author">Author:</dt>
915
+ <dd class="tag-author">
916
+ <ul>
917
+ <li>Haixing Hu</li>
918
+ </ul>
919
+ </dd>
920
+
921
+
922
+
923
+
924
+
925
+
926
+
927
+
928
+
929
+
930
+
931
+
932
+
933
+ <dt class="tag-see">See:</dt>
934
+ <dd class="tag-see">
935
+ <ul>
936
+ <li><a href="https://www.npmjs.com/package/@rollup/plugin-commonjs">https://www.npmjs.com/package/@rollup/plugin-commonjs</a></li>
937
+ </ul>
938
+ </dd>
939
+
940
+
941
+
942
+ </dl>
943
+
944
+
945
+
946
+
947
+
948
+
949
+
950
+
951
+
952
+ <h5>Parameters:</h5>
953
+
954
+
955
+ <table class="params">
956
+ <thead>
957
+ <tr>
958
+
959
+ <th>Name</th>
960
+
961
+
962
+ <th>Type</th>
963
+
964
+
965
+
966
+
967
+
968
+ <th class="last">Description</th>
969
+ </tr>
970
+ </thead>
971
+
972
+ <tbody>
973
+
974
+
975
+ <tr>
976
+
977
+ <td class="name"><code>format</code></td>
978
+
979
+
980
+ <td class="type">
981
+
982
+
983
+ <span class="param-type"><code>string</code></span>
984
+
985
+
986
+
987
+ </td>
988
+
989
+
990
+
991
+
992
+
993
+ <td class="description last">
994
+ <p>The format of the library.</p>
995
+
996
+ </td>
997
+ </tr>
998
+
999
+
1000
+
1001
+ <tr>
1002
+
1003
+ <td class="name"><code>importMetaUrl</code></td>
1004
+
1005
+
1006
+ <td class="type">
1007
+
1008
+
1009
+ <span class="param-type"><code>string</code></span>
1010
+
1011
+
1012
+
1013
+ </td>
1014
+
1015
+
1016
+
1017
+
1018
+
1019
+ <td class="description last">
1020
+ <p>The URL of the <code>import.meta</code> of the caller module.</p>
1021
+
1022
+ </td>
1023
+ </tr>
1024
+
1025
+
1026
+
1027
+ <tr>
1028
+
1029
+ <td class="name"><code>options</code></td>
1030
+
1031
+
1032
+ <td class="type">
1033
+
1034
+
1035
+ <span class="param-type"><code>object</code></span>
1036
+
1037
+
1038
+
1039
+ </td>
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+ <td class="description last">
1046
+ <p>The additional options for building the library.</p>
1047
+
1048
+ </td>
1049
+ </tr>
1050
+
1051
+
1052
+
1053
+ <tr>
1054
+
1055
+ <td class="name"><code>plugins</code></td>
1056
+
1057
+
1058
+ <td class="type">
1059
+
1060
+
1061
+ <span class="param-type"><code>Array.&lt;Object></code></span>
1062
+
1063
+
1064
+
1065
+ </td>
1066
+
1067
+
1068
+
1069
+
1070
+
1071
+ <td class="description last">
1072
+ <p>The Rollup plugins array.</p>
1073
+
1074
+ </td>
1075
+ </tr>
1076
+
1077
+
1078
+ </tbody>
1079
+ </table>
1080
+
1081
+
1082
+
1083
+
1084
+
1085
+
1086
+
1087
+
1088
+
1089
+
1090
+
1091
+
1092
+
1093
+
1094
+
1095
+
1096
+ <div class="section-returns">
1097
+ <h5>Returns:</h5>
1098
+
1099
+
1100
+
1101
+ <dl class="param-type">
1102
+ <dt>
1103
+ Type:
1104
+ </dt>
1105
+ <dd>
1106
+
1107
+ <span class="param-type"><code>Array.&lt;Object></code></span>
1108
+
1109
+
1110
+ </dd>
1111
+ </dl>
1112
+
1113
+
1114
+ <div class="param-desc">
1115
+ <p>The modified Rollup plugins array.</p>
1116
+ </div>
1117
+
1118
+
1119
+ </div>
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+ </div>
1126
+
1127
+
1128
+ <div class="section-method">
1129
+
1130
+
1131
+
1132
+
1133
+ <h4 class="name" id="configNodeResolvePlugin"><span class="type-signature"></span>configNodeResolvePlugin<span class="signature">(format, importMetaUrl, options, plugins)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+
1140
+ <div class="description">
1141
+ <p>Configures the <code>@rollup/plugin-node-resolve</code> plugin.</p>
1142
+ </div>
1143
+
1144
+
1145
+
1146
+
1147
+
1148
+ <dl class="details">
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+
1164
+
1165
+
1166
+
1167
+ <dt class="tag-author">Author:</dt>
1168
+ <dd class="tag-author">
1169
+ <ul>
1170
+ <li>Haixing Hu</li>
1171
+ </ul>
1172
+ </dd>
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+
1184
+
1185
+
1186
+ <dt class="tag-see">See:</dt>
1187
+ <dd class="tag-see">
1188
+ <ul>
1189
+ <li><a href="https://www.npmjs.com/package/@rollup/plugin-node-resolve">https://www.npmjs.com/package/@rollup/plugin-node-resolve</a></li>
1190
+ </ul>
1191
+ </dd>
1192
+
1193
+
1194
+
1195
+ </dl>
1196
+
1197
+
1198
+
1199
+
1200
+
1201
+
1202
+
1203
+
1204
+
1205
+ <h5>Parameters:</h5>
1206
+
1207
+
1208
+ <table class="params">
1209
+ <thead>
1210
+ <tr>
1211
+
1212
+ <th>Name</th>
1213
+
1214
+
1215
+ <th>Type</th>
1216
+
1217
+
1218
+
1219
+
1220
+
1221
+ <th class="last">Description</th>
1222
+ </tr>
1223
+ </thead>
1224
+
1225
+ <tbody>
1226
+
1227
+
1228
+ <tr>
1229
+
1230
+ <td class="name"><code>format</code></td>
1231
+
1232
+
1233
+ <td class="type">
1234
+
1235
+
1236
+ <span class="param-type"><code>string</code></span>
1237
+
1238
+
1239
+
1240
+ </td>
1241
+
1242
+
1243
+
1244
+
1245
+
1246
+ <td class="description last">
1247
+ <p>The format of the library.</p>
1248
+
1249
+ </td>
1250
+ </tr>
1251
+
1252
+
1253
+
1254
+ <tr>
1255
+
1256
+ <td class="name"><code>importMetaUrl</code></td>
1257
+
1258
+
1259
+ <td class="type">
1260
+
1261
+
1262
+ <span class="param-type"><code>string</code></span>
1263
+
1264
+
1265
+
1266
+ </td>
1267
+
1268
+
1269
+
1270
+
1271
+
1272
+ <td class="description last">
1273
+ <p>The URL of the <code>import.meta</code> of the caller module.</p>
1274
+
1275
+ </td>
1276
+ </tr>
1277
+
1278
+
1279
+
1280
+ <tr>
1281
+
1282
+ <td class="name"><code>options</code></td>
1283
+
1284
+
1285
+ <td class="type">
1286
+
1287
+
1288
+ <span class="param-type"><code>object</code></span>
1289
+
1290
+
1291
+
1292
+ </td>
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+ <td class="description last">
1299
+ <p>The additional options for building the library.</p>
1300
+
1301
+ </td>
1302
+ </tr>
1303
+
1304
+
1305
+
1306
+ <tr>
1307
+
1308
+ <td class="name"><code>plugins</code></td>
1309
+
1310
+
1311
+ <td class="type">
1312
+
1313
+
1314
+ <span class="param-type"><code>Array.&lt;Object></code></span>
1315
+
1316
+
1317
+
1318
+ </td>
1319
+
1320
+
1321
+
1322
+
1323
+
1324
+ <td class="description last">
1325
+ <p>The Rollup plugins array.</p>
1326
+
1327
+ </td>
1328
+ </tr>
1329
+
1330
+
1331
+ </tbody>
1332
+ </table>
1333
+
1334
+
1335
+
1336
+
1337
+
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+ <div class="section-returns">
1350
+ <h5>Returns:</h5>
1351
+
1352
+
1353
+
1354
+ <dl class="param-type">
1355
+ <dt>
1356
+ Type:
1357
+ </dt>
1358
+ <dd>
1359
+
1360
+ <span class="param-type"><code>Array.&lt;Object></code></span>
1361
+
1362
+
1363
+ </dd>
1364
+ </dl>
1365
+
1366
+
1367
+ <div class="param-desc">
1368
+ <p>The modified Rollup plugins array.</p>
1369
+ </div>
1370
+
1371
+
1372
+ </div>
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+ </div>
1379
+
1380
+
1381
+ <div class="section-method">
1382
+
1383
+
1384
+
1385
+
1386
+ <h4 class="name" id="configTerserPlugin"><span class="type-signature"></span>configTerserPlugin<span class="signature">(format, importMetaUrl, options, plugins)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
1387
+
1388
+
1389
+
1390
+
1391
+
1392
+
1393
+ <div class="description">
1394
+ <p>Configures the <code>@rollup/plugin-terser</code> plugin.</p>
1395
+ </div>
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+ <dl class="details">
1402
+
1403
+
1404
+
1405
+
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+
1415
+
1416
+
1417
+
1418
+
1419
+
1420
+ <dt class="tag-author">Author:</dt>
1421
+ <dd class="tag-author">
1422
+ <ul>
1423
+ <li>Haixing Hu</li>
1424
+ </ul>
1425
+ </dd>
1426
+
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+
1434
+
1435
+
1436
+
1437
+
1438
+
1439
+ <dt class="tag-see">See:</dt>
1440
+ <dd class="tag-see">
1441
+ <ul>
1442
+ <li><a href="https://www.npmjs.com/package/@rollup/plugin-terser">https://www.npmjs.com/package/@rollup/plugin-terser</a></li>
1443
+ </ul>
1444
+ </dd>
1445
+
1446
+
1447
+
1448
+ </dl>
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+
1456
+
1457
+
1458
+ <h5>Parameters:</h5>
1459
+
1460
+
1461
+ <table class="params">
1462
+ <thead>
1463
+ <tr>
1464
+
1465
+ <th>Name</th>
1466
+
1467
+
1468
+ <th>Type</th>
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+ <th class="last">Description</th>
1475
+ </tr>
1476
+ </thead>
1477
+
1478
+ <tbody>
1479
+
1480
+
1481
+ <tr>
1482
+
1483
+ <td class="name"><code>format</code></td>
1484
+
1485
+
1486
+ <td class="type">
1487
+
1488
+
1489
+ <span class="param-type"><code>string</code></span>
1490
+
1491
+
1492
+
1493
+ </td>
1494
+
1495
+
1496
+
1497
+
1498
+
1499
+ <td class="description last">
1500
+ <p>The format of the library.</p>
1501
+
1502
+ </td>
1503
+ </tr>
1504
+
1505
+
1506
+
1507
+ <tr>
1508
+
1509
+ <td class="name"><code>importMetaUrl</code></td>
1510
+
1511
+
1512
+ <td class="type">
1513
+
1514
+
1515
+ <span class="param-type"><code>string</code></span>
1516
+
1517
+
1518
+
1519
+ </td>
1520
+
1521
+
1522
+
1523
+
1524
+
1525
+ <td class="description last">
1526
+ <p>The URL of the <code>import.meta</code> of the caller module.</p>
1527
+
1528
+ </td>
1529
+ </tr>
1530
+
1531
+
1532
+
1533
+ <tr>
1534
+
1535
+ <td class="name"><code>options</code></td>
1536
+
1537
+
1538
+ <td class="type">
1539
+
1540
+
1541
+ <span class="param-type"><code>object</code></span>
1542
+
1543
+
1544
+
1545
+ </td>
1546
+
1547
+
1548
+
1549
+
1550
+
1551
+ <td class="description last">
1552
+ <p>The additional options for building the library.</p>
1553
+
1554
+ </td>
1555
+ </tr>
1556
+
1557
+
1558
+
1559
+ <tr>
1560
+
1561
+ <td class="name"><code>plugins</code></td>
1562
+
1563
+
1564
+ <td class="type">
1565
+
1566
+
1567
+ <span class="param-type"><code>Array</code></span>
1568
+
1569
+
1570
+
1571
+ </td>
1572
+
1573
+
1574
+
1575
+
1576
+
1577
+ <td class="description last">
1578
+ <p>The array of Rollup plugins.</p>
1579
+
1580
+ </td>
1581
+ </tr>
1582
+
1583
+
1584
+ </tbody>
1585
+ </table>
1586
+
1587
+
1588
+
1589
+
1590
+
1591
+
1592
+
1593
+
1594
+
1595
+
1596
+
1597
+
1598
+
1599
+
1600
+
1601
+
1602
+ <div class="section-returns">
1603
+ <h5>Returns:</h5>
1604
+
1605
+
1606
+
1607
+ <dl class="param-type">
1608
+ <dt>
1609
+ Type:
1610
+ </dt>
1611
+ <dd>
1612
+
1613
+ <span class="param-type"><code>Array.&lt;Object></code></span>
1614
+
1615
+
1616
+ </dd>
1617
+ </dl>
1618
+
1619
+
1620
+ <div class="param-desc">
1621
+ <p>The modified Rollup plugins array.</p>
1622
+ </div>
1623
+
1624
+
1625
+ </div>
1626
+
1627
+
1628
+
1629
+
1630
+
1631
+ </div>
1632
+
1633
+
1634
+ <div class="section-method">
1635
+
1636
+
1637
+
1638
+
1639
+ <h4 class="name" id="configVisualizerPlugin"><span class="type-signature"></span>configVisualizerPlugin<span class="signature">(format, importMetaUrl, options, plugins)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
1640
+
1641
+
1642
+
1643
+
1644
+
1645
+
1646
+ <div class="description">
1647
+ <p>Configures the <code>rollup-plugin-visualizer</code> plugin.</p>
1648
+ <p>The <code>rollup-plugin-visualizer</code> will visualize and analyze your Rollup
1649
+ bundle to see which modules are taking up space.</p>
1650
+ </div>
1651
+
1652
+
1653
+
1654
+
1655
+
1656
+ <dl class="details">
1657
+
1658
+
1659
+
1660
+
1661
+
1662
+
1663
+
1664
+
1665
+
1666
+
1667
+
1668
+
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+ <dt class="tag-author">Author:</dt>
1676
+ <dd class="tag-author">
1677
+ <ul>
1678
+ <li>Haixing Hu</li>
1679
+ </ul>
1680
+ </dd>
1681
+
1682
+
1683
+
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+
1694
+ <dt class="tag-see">See:</dt>
1695
+ <dd class="tag-see">
1696
+ <ul>
1697
+ <li><a href="https://www.npmjs.com/package/rollup-plugin-visualizer">https://www.npmjs.com/package/rollup-plugin-visualizer</a></li>
1698
+ </ul>
1699
+ </dd>
1700
+
1701
+
1702
+
1703
+ </dl>
1704
+
1705
+
1706
+
1707
+
1708
+
1709
+
1710
+
1711
+
1712
+
1713
+ <h5>Parameters:</h5>
1714
+
1715
+
1716
+ <table class="params">
1717
+ <thead>
1718
+ <tr>
1719
+
1720
+ <th>Name</th>
1721
+
1722
+
1723
+ <th>Type</th>
1724
+
1725
+
1726
+
1727
+
1728
+
1729
+ <th class="last">Description</th>
1730
+ </tr>
1731
+ </thead>
1732
+
1733
+ <tbody>
1734
+
1735
+
1736
+ <tr>
1737
+
1738
+ <td class="name"><code>format</code></td>
1739
+
1740
+
1741
+ <td class="type">
1742
+
1743
+
1744
+ <span class="param-type"><code>string</code></span>
1745
+
1746
+
1747
+
1748
+ </td>
1749
+
1750
+
1751
+
1752
+
1753
+
1754
+ <td class="description last">
1755
+ <p>The format of the library.</p>
1756
+
1757
+ </td>
1758
+ </tr>
1759
+
1760
+
1761
+
1762
+ <tr>
1763
+
1764
+ <td class="name"><code>importMetaUrl</code></td>
1765
+
1766
+
1767
+ <td class="type">
1768
+
1769
+
1770
+ <span class="param-type"><code>string</code></span>
1771
+
1772
+
1773
+
1774
+ </td>
1775
+
1776
+
1777
+
1778
+
1779
+
1780
+ <td class="description last">
1781
+ <p>The URL of the <code>import.meta</code> of the caller module.</p>
1782
+
1783
+ </td>
1784
+ </tr>
1785
+
1786
+
1787
+
1788
+ <tr>
1789
+
1790
+ <td class="name"><code>options</code></td>
1791
+
1792
+
1793
+ <td class="type">
1794
+
1795
+
1796
+ <span class="param-type"><code>object</code></span>
1797
+
1798
+
1799
+
1800
+ </td>
1801
+
1802
+
1803
+
1804
+
1805
+
1806
+ <td class="description last">
1807
+ <p>The additional options for building the library.</p>
1808
+
1809
+ </td>
1810
+ </tr>
1811
+
1812
+
1813
+
1814
+ <tr>
1815
+
1816
+ <td class="name"><code>plugins</code></td>
1817
+
1818
+
1819
+ <td class="type">
1820
+
1821
+
1822
+ <span class="param-type"><code>Array</code></span>
1823
+
1824
+
1825
+
1826
+ </td>
1827
+
1828
+
1829
+
1830
+
1831
+
1832
+ <td class="description last">
1833
+ <p>The array of Rollup plugins.</p>
1834
+
1835
+ </td>
1836
+ </tr>
1837
+
1838
+
1839
+ </tbody>
1840
+ </table>
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+
1850
+
1851
+
1852
+
1853
+
1854
+
1855
+
1856
+
1857
+ <div class="section-returns">
1858
+ <h5>Returns:</h5>
1859
+
1860
+
1861
+
1862
+ <dl class="param-type">
1863
+ <dt>
1864
+ Type:
1865
+ </dt>
1866
+ <dd>
1867
+
1868
+ <span class="param-type"><code>Array.&lt;Object></code></span>
1869
+
1870
+
1871
+ </dd>
1872
+ </dl>
1873
+
1874
+
1875
+ <div class="param-desc">
1876
+ <p>The modified Rollup plugins array.</p>
1877
+ </div>
1878
+
1879
+
1880
+ </div>
1881
+
1882
+
1883
+
1884
+
1885
+
1886
+ </div>
1887
+
1888
+
1889
+ <div class="section-method">
1890
+
1891
+
1892
+
1893
+
1894
+ <h4 class="name" id="getRollupExternal"><span class="type-signature"></span>getRollupExternal<span class="signature">(importMetaUrl, options)</span><span class="type-signature"> &rarr; {function}</span></h4>
1895
+
1896
+
1897
+
1898
+
1899
+
1900
+
1901
+ <div class="description">
1902
+ <p>Gets Rollup <code>external</code> configuration.</p>
1903
+ </div>
1904
+
1905
+
1906
+
1907
+
1908
+
1909
+ <dl class="details">
1910
+
1911
+
1912
+
1913
+
1914
+
1915
+
1916
+
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+
1923
+
1924
+
1925
+
1926
+
1927
+
1928
+ <dt class="tag-author">Author:</dt>
1929
+ <dd class="tag-author">
1930
+ <ul>
1931
+ <li>Haixing Hu</li>
1932
+ </ul>
1933
+ </dd>
1934
+
1935
+
1936
+
1937
+
1938
+
1939
+
1940
+
1941
+
1942
+
1943
+
1944
+
1945
+
1946
+
1947
+
1948
+
1949
+ </dl>
1950
+
1951
+
1952
+
1953
+
1954
+
1955
+
1956
+
1957
+
1958
+
1959
+ <h5>Parameters:</h5>
1960
+
1961
+
1962
+ <table class="params">
1963
+ <thead>
1964
+ <tr>
1965
+
1966
+ <th>Name</th>
1967
+
1968
+
1969
+ <th>Type</th>
1970
+
1971
+
1972
+
1973
+
1974
+
1975
+ <th class="last">Description</th>
1976
+ </tr>
1977
+ </thead>
1978
+
1979
+ <tbody>
1980
+
1981
+
1982
+ <tr>
1983
+
1984
+ <td class="name"><code>importMetaUrl</code></td>
1985
+
1986
+
1987
+ <td class="type">
1988
+
1989
+
1990
+ <span class="param-type"><code>string</code></span>
1991
+
1992
+
1993
+
1994
+ </td>
1995
+
1996
+
1997
+
1998
+
1999
+
2000
+ <td class="description last">
2001
+ <p>The URL of the <code>import.meta</code> of the caller module.</p>
2002
+
2003
+ </td>
2004
+ </tr>
2005
+
2006
+
2007
+
2008
+ <tr>
2009
+
2010
+ <td class="name"><code>options</code></td>
2011
+
2012
+
2013
+ <td class="type">
2014
+
2015
+
2016
+ <span class="param-type"><code>object</code></span>
2017
+
2018
+
2019
+
2020
+ </td>
2021
+
2022
+
2023
+
2024
+
2025
+
2026
+ <td class="description last">
2027
+ <p>The additional options for building the library.</p>
2028
+
2029
+ </td>
2030
+ </tr>
2031
+
2032
+
2033
+ </tbody>
2034
+ </table>
2035
+
2036
+
2037
+
2038
+
2039
+
2040
+
2041
+
2042
+
2043
+
2044
+
2045
+
2046
+
2047
+
2048
+
2049
+
2050
+
2051
+ <div class="section-returns">
2052
+ <h5>Returns:</h5>
2053
+
2054
+
2055
+
2056
+ <dl class="param-type">
2057
+ <dt>
2058
+ Type:
2059
+ </dt>
2060
+ <dd>
2061
+
2062
+ <span class="param-type"><code>function</code></span>
2063
+
2064
+
2065
+ </dd>
2066
+ </dl>
2067
+
2068
+
2069
+ <div class="param-desc">
2070
+ <p>The predicate used as the Rollup <code>external</code> configuration for the library.</p>
2071
+ </div>
2072
+
2073
+
2074
+ </div>
2075
+
2076
+
2077
+
2078
+
2079
+
2080
+ </div>
2081
+
2082
+
2083
+ <div class="section-method">
2084
+
2085
+
2086
+
2087
+
2088
+ <h4 class="name" id="getRollupOutput"><span class="type-signature"></span>getRollupOutput<span class="signature">(format, libraryName, options)</span><span class="type-signature"> &rarr; {object}</span></h4>
2089
+
2090
+
2091
+
2092
+
2093
+
2094
+
2095
+ <div class="description">
2096
+ <p>Gets the Rollup <code>output</code> configuration.</p>
2097
+ </div>
2098
+
2099
+
2100
+
2101
+
2102
+
2103
+ <dl class="details">
2104
+
2105
+
2106
+
2107
+
2108
+
2109
+
2110
+
2111
+
2112
+
2113
+
2114
+
2115
+
2116
+
2117
+
2118
+
2119
+
2120
+
2121
+
2122
+ <dt class="tag-author">Author:</dt>
2123
+ <dd class="tag-author">
2124
+ <ul>
2125
+ <li>Haixing Hu</li>
2126
+ </ul>
2127
+ </dd>
2128
+
2129
+
2130
+
2131
+
2132
+
2133
+
2134
+
2135
+
2136
+
2137
+
2138
+
2139
+
2140
+
2141
+
2142
+
2143
+ </dl>
2144
+
2145
+
2146
+
2147
+
2148
+
2149
+
2150
+
2151
+
2152
+
2153
+ <h5>Parameters:</h5>
2154
+
2155
+
2156
+ <table class="params">
2157
+ <thead>
2158
+ <tr>
2159
+
2160
+ <th>Name</th>
2161
+
2162
+
2163
+ <th>Type</th>
2164
+
2165
+
2166
+
2167
+
2168
+
2169
+ <th class="last">Description</th>
2170
+ </tr>
2171
+ </thead>
2172
+
2173
+ <tbody>
2174
+
2175
+
2176
+ <tr>
2177
+
2178
+ <td class="name"><code>format</code></td>
2179
+
2180
+
2181
+ <td class="type">
2182
+
2183
+
2184
+ <span class="param-type"><code>string</code></span>
2185
+
2186
+
2187
+
2188
+ </td>
2189
+
2190
+
2191
+
2192
+
2193
+
2194
+ <td class="description last">
2195
+ <p>The format of the library.</p>
2196
+
2197
+ </td>
2198
+ </tr>
2199
+
2200
+
2201
+
2202
+ <tr>
2203
+
2204
+ <td class="name"><code>libraryName</code></td>
2205
+
2206
+
2207
+ <td class="type">
2208
+
2209
+
2210
+ <span class="param-type"><code>string</code></span>
2211
+
2212
+
2213
+
2214
+ </td>
2215
+
2216
+
2217
+
2218
+
2219
+
2220
+ <td class="description last">
2221
+ <p>The name of the library.</p>
2222
+
2223
+ </td>
2224
+ </tr>
2225
+
2226
+
2227
+
2228
+ <tr>
2229
+
2230
+ <td class="name"><code>options</code></td>
2231
+
2232
+
2233
+ <td class="type">
2234
+
2235
+
2236
+ <span class="param-type"><code>object</code></span>
2237
+
2238
+
2239
+
2240
+ </td>
2241
+
2242
+
2243
+
2244
+
2245
+
2246
+ <td class="description last">
2247
+ <p>The additional options for building the library.</p>
2248
+
2249
+ </td>
2250
+ </tr>
2251
+
2252
+
2253
+ </tbody>
2254
+ </table>
2255
+
2256
+
2257
+
2258
+
2259
+
2260
+
2261
+
2262
+
2263
+
2264
+
2265
+
2266
+
2267
+
2268
+
2269
+
2270
+
2271
+ <div class="section-returns">
2272
+ <h5>Returns:</h5>
2273
+
2274
+
2275
+
2276
+ <dl class="param-type">
2277
+ <dt>
2278
+ Type:
2279
+ </dt>
2280
+ <dd>
2281
+
2282
+ <span class="param-type"><code>object</code></span>
2283
+
2284
+
2285
+ </dd>
2286
+ </dl>
2287
+
2288
+
2289
+ <div class="param-desc">
2290
+ <p>The Rollup output configuration for the library.</p>
2291
+ </div>
2292
+
2293
+
2294
+ </div>
2295
+
2296
+
2297
+
2298
+
2299
+
2300
+ </div>
2301
+
2302
+
2303
+ <div class="section-method">
2304
+
2305
+
2306
+
2307
+
2308
+ <h4 class="name" id="getRollupPlugins"><span class="type-signature"></span>getRollupPlugins<span class="signature">(format, importMetaUrl, options)</span><span class="type-signature"> &rarr; {Array.&lt;Object>}</span></h4>
2309
+
2310
+
2311
+
2312
+
2313
+
2314
+
2315
+ <div class="description">
2316
+ <p>Gets Rollup <code>plugins</code> configuration.</p>
2317
+ </div>
2318
+
2319
+
2320
+
2321
+
2322
+
2323
+ <dl class="details">
2324
+
2325
+
2326
+
2327
+
2328
+
2329
+
2330
+
2331
+
2332
+
2333
+
2334
+
2335
+
2336
+
2337
+
2338
+
2339
+
2340
+
2341
+
2342
+ <dt class="tag-author">Author:</dt>
2343
+ <dd class="tag-author">
2344
+ <ul>
2345
+ <li>Haixing Hu</li>
2346
+ </ul>
2347
+ </dd>
2348
+
2349
+
2350
+
2351
+
2352
+
2353
+
2354
+
2355
+
2356
+
2357
+
2358
+
2359
+
2360
+
2361
+
2362
+
2363
+ </dl>
2364
+
2365
+
2366
+
2367
+
2368
+
2369
+
2370
+
2371
+
2372
+
2373
+ <h5>Parameters:</h5>
2374
+
2375
+
2376
+ <table class="params">
2377
+ <thead>
2378
+ <tr>
2379
+
2380
+ <th>Name</th>
2381
+
2382
+
2383
+ <th>Type</th>
2384
+
2385
+
2386
+
2387
+
2388
+
2389
+ <th class="last">Description</th>
2390
+ </tr>
2391
+ </thead>
2392
+
2393
+ <tbody>
2394
+
2395
+
2396
+ <tr>
2397
+
2398
+ <td class="name"><code>format</code></td>
2399
+
2400
+
2401
+ <td class="type">
2402
+
2403
+
2404
+ <span class="param-type"><code>string</code></span>
2405
+
2406
+
2407
+
2408
+ </td>
2409
+
2410
+
2411
+
2412
+
2413
+
2414
+ <td class="description last">
2415
+ <p>The format of the library.</p>
2416
+
2417
+ </td>
2418
+ </tr>
2419
+
2420
+
2421
+
2422
+ <tr>
2423
+
2424
+ <td class="name"><code>importMetaUrl</code></td>
2425
+
2426
+
2427
+ <td class="type">
2428
+
2429
+
2430
+ <span class="param-type"><code>string</code></span>
2431
+
2432
+
2433
+
2434
+ </td>
2435
+
2436
+
2437
+
2438
+
2439
+
2440
+ <td class="description last">
2441
+ <p>The URL of the <code>import.meta</code> of the caller module.</p>
2442
+
2443
+ </td>
2444
+ </tr>
2445
+
2446
+
2447
+
2448
+ <tr>
2449
+
2450
+ <td class="name"><code>options</code></td>
2451
+
2452
+
2453
+ <td class="type">
2454
+
2455
+
2456
+ <span class="param-type"><code>object</code></span>
2457
+
2458
+
2459
+
2460
+ </td>
2461
+
2462
+
2463
+
2464
+
2465
+
2466
+ <td class="description last">
2467
+ <p>The additional options for building the library.</p>
2468
+
2469
+ </td>
2470
+ </tr>
2471
+
2472
+
2473
+ </tbody>
2474
+ </table>
2475
+
2476
+
2477
+
2478
+
2479
+
2480
+
2481
+
2482
+
2483
+
2484
+
2485
+
2486
+
2487
+
2488
+
2489
+
2490
+
2491
+ <div class="section-returns">
2492
+ <h5>Returns:</h5>
2493
+
2494
+
2495
+
2496
+ <dl class="param-type">
2497
+ <dt>
2498
+ Type:
2499
+ </dt>
2500
+ <dd>
2501
+
2502
+ <span class="param-type"><code>Array.&lt;Object></code></span>
2503
+
2504
+
2505
+ </dd>
2506
+ </dl>
2507
+
2508
+
2509
+ <div class="param-desc">
2510
+ <p>The Rollup plugins array.</p>
2511
+ </div>
2512
+
2513
+
2514
+ </div>
2515
+
2516
+
2517
+
2518
+
2519
+
2520
+ </div>
2521
+
2522
+
2523
+ <div class="section-method">
2524
+
2525
+
2526
+
2527
+
2528
+ <h4 class="name" id="rollupBuilder"><span class="type-signature"></span>rollupBuilder<span class="signature">(libraryName, importMetaUrl, options)</span><span class="type-signature"> &rarr; {Array.&lt;object>}</span></h4>
2529
+
2530
+
2531
+
2532
+
2533
+
2534
+
2535
+ <div class="description">
2536
+ <p>Builds the Rollup configuration for a library.</p>
2537
+ <p>The function could be provided with an additional options for building the
2538
+ library. It can have the following fields:</p>
2539
+ <ul>
2540
+ <li>
2541
+ <p><code>debug: boolean</code>: whether to print the debug information. If this field is
2542
+ not specified, the default value is <code>false</code>.</p>
2543
+ </li>
2544
+ <li>
2545
+ <p><code>formats: [string]</code>: the array of formats of the library. It can be an
2546
+ array of the following values:</p>
2547
+ <ul>
2548
+ <li><code>'cjs'</code>: the CommonJS format.</li>
2549
+ <li><code>'umd'</code>: the UMD format.</li>
2550
+ <li><code>'esm'</code>: the ES module format.</li>
2551
+ </ul>
2552
+ <p>If this field is not specified, the default value is <code>['cjs', 'esm']</code>.</p>
2553
+ </li>
2554
+ <li>
2555
+ <p><code>exports: string</code>: the export mode to use. It can be one of the following
2556
+ values:</p>
2557
+ <ul>
2558
+ <li><code>'auto'</code>: automatically guesses your intentions based on what the input
2559
+ module exports.</li>
2560
+ <li><code>'default'</code>: if you are only exporting one thing using <code>export default ...</code>;
2561
+ note that this can cause issues when generating CommonJS output that is
2562
+ meant to be interchangeable with ESM output.</li>
2563
+ <li><code>'named'</code>: if you are using named exports.</li>
2564
+ <li><code>'none'</code>: if you are not exporting anything (e.g. you are building an
2565
+ app, not a library)</li>
2566
+ <li><code>'mixed'</code>: if you are using named exports mixed with a default export.
2567
+ Note that this is not a standard exports mode officially supported by
2568
+ the <code>rollup</code>, instead, it is an additional mode add by this library.</li>
2569
+ </ul>
2570
+ <p>See <a href="https://rollupjs.org/configuration-options/#output-exports">output.exports</a>
2571
+ for more details. If this field is not specified, the default value is
2572
+ <code>'auto'</code>.</p>
2573
+ </li>
2574
+ <li>
2575
+ <p><code>nodeEnv: string</code>: the value of the <code>NODE_ENV</code> environment variable. If
2576
+ this field is not specified, the default value is <code>process.env.NODE_ENV</code>.</p>
2577
+ </li>
2578
+ <li>
2579
+ <p><code>minify: boolean</code>: whether to minify the code. If this field is not
2580
+ specified, and the <code>nodeEnv</code> is <code>production</code>, the default value is <code>true</code>;
2581
+ otherwise the default value is <code>false</code>.</p>
2582
+ </li>
2583
+ <li>
2584
+ <p><code>sourcemap: boolean</code>: whether to generate the source map. If this field is
2585
+ not specified, the default value is <code>true</code>.</p>
2586
+ </li>
2587
+ <li>
2588
+ <p><code>input: string</code>: the input file of the library. If this field is not
2589
+ specified, the default value is <code>src/index.js</code>.</p>
2590
+ </li>
2591
+ <li>
2592
+ <p><code>outputDir: string</code>: the output directory of the library. If this field is
2593
+ not specified, the default value is <code>dist</code>.</p>
2594
+ </li>
2595
+ <li>
2596
+ <p><code>filenamePrefix: string</code>: the prefix of the output filename. If this field
2597
+ is not specified, the default value is the dash case of the library name.
2598
+ For example, if the library name is <code>MyLibrary</code>, the default value of this
2599
+ field is <code>my-library</code>.</p>
2600
+ </li>
2601
+ <li>
2602
+ <p><code>externals: [string]</code>: the array of additional external packages, each can
2603
+ be specified with either a string or a regular expression. If this field is
2604
+ not specified, the default value is an empty array.</p>
2605
+ </li>
2606
+ <li>
2607
+ <p><code>useAliasPlugin: boolean</code>: whether to use the <code>@rollup/plugin-alias</code> plugin.
2608
+ If this field is not specified, the default value is <code>true</code>.</p>
2609
+ </li>
2610
+ <li>
2611
+ <p><code>aliasPluginOptions: object</code>: the options for the <code>@rollup/plugin-alias</code>
2612
+ plugin. If this field is not specified, the default value is:</p>
2613
+ <pre class="prettyprint source lang-js"><code>{
2614
+ entries: {
2615
+ 'src': fileURLToPath(new URL('src', importMetaUrl)),
2616
+ },
2617
+ }
2618
+ </code></pre>
2619
+ </li>
2620
+ <li>
2621
+ <p><code>useNodeResolvePlugin: boolean</code>: whether to use the <code>@rollup/plugin-node-resolve</code>
2622
+ plugin. If this field is not specified, the default value is <code>true</code>.</p>
2623
+ </li>
2624
+ <li>
2625
+ <p><code>nodeResolvePluginOptions: object</code>: the options for the <code>@rollup/plugin-node-resolve</code>
2626
+ plugin. If this field is not specified, the default value is: <code>{}</code>.</p>
2627
+ </li>
2628
+ <li>
2629
+ <p><code>useCommonjsPlugin: boolean</code>: whether to use the <code>@rollup/plugin-commonjs</code>
2630
+ plugin. If this field is not specified, the default value is <code>true</code>.</p>
2631
+ </li>
2632
+ <li>
2633
+ <p><code>commonjsPluginOptions: object</code>: the options for the <code>@rollup/plugin-commonjs</code>
2634
+ plugin. If this field is not specified, the default value is:</p>
2635
+ <pre class="prettyprint source lang-js"><code>{
2636
+ include: ['node_modules/**'],
2637
+ }
2638
+ </code></pre>
2639
+ </li>
2640
+ <li>
2641
+ <p><code>useBabelPlugin: boolean</code>: whether to use the <code>@rollup/plugin-babel</code> plugin.
2642
+ If this field is not specified, the default value is <code>true</code>.</p>
2643
+ </li>
2644
+ <li>
2645
+ <p><code>babelPluginOptions: object</code>: the options for the <code>@rollup/plugin-babel</code>
2646
+ plugin. If this field is not specified, the default value is:</p>
2647
+ <pre class="prettyprint source lang-js"><code>{
2648
+ babelHelpers: 'runtime',
2649
+ exclude: ['node_modules/**'],
2650
+ presets: [
2651
+ '@babel/preset-env',
2652
+ ],
2653
+ plugins: [
2654
+ '@babel/plugin-transform-runtime',
2655
+ ],
2656
+ }
2657
+ </code></pre>
2658
+ <p>Note that when using the <code>@rollup/plugin-babel</code> plugin, you can also specify
2659
+ the configuration of Babel in the standard Babel configuration files,
2660
+ such as <code>babel.config.js</code>, <code>.babelrc</code>, etc.</p>
2661
+ </li>
2662
+ <li>
2663
+ <p><code>terserOptions: object</code>: the options for the <code>@rollup/plugin-terser</code> plugin.
2664
+ If this field is not specified, the default value is: <code>{}</code>. Whether to use
2665
+ the <code>@rollup/plugin-terser</code> plugin depends on the <code>minify</code> field of the
2666
+ options or the <code>NODE_ENV</code> environment variable.</p>
2667
+ </li>
2668
+ <li>
2669
+ <p><code>useAnalyzerPlugin: boolean</code>: whether to use the <code>rollup-plugin-analyzer</code>
2670
+ plugin. If this field is not specified, the default value is <code>true</code>.</p>
2671
+ </li>
2672
+ <li>
2673
+ <p><code>analyzerOptions: object</code>: the options for the <code>rollup-plugin-analyzer</code>
2674
+ plugin. If this field is not specified, the default value is:</p>
2675
+ <pre class="prettyprint source lang-js"><code>{
2676
+ hideDeps: true,
2677
+ limit: 0,
2678
+ summaryOnly: true,
2679
+ }
2680
+ </code></pre>
2681
+ </li>
2682
+ <li>
2683
+ <p><code>plugins: [object]</code>: the array of configuration of additional Rollup
2684
+ plugins. If this field is not specified, the default value is an empty
2685
+ array.</p>
2686
+ </li>
2687
+ </ul>
2688
+ </div>
2689
+
2690
+
2691
+
2692
+
2693
+
2694
+ <dl class="details">
2695
+
2696
+
2697
+
2698
+
2699
+
2700
+
2701
+
2702
+
2703
+
2704
+
2705
+
2706
+
2707
+
2708
+
2709
+
2710
+
2711
+
2712
+
2713
+
2714
+
2715
+
2716
+
2717
+
2718
+
2719
+
2720
+
2721
+
2722
+
2723
+
2724
+
2725
+
2726
+
2727
+ </dl>
2728
+
2729
+
2730
+
2731
+
2732
+
2733
+
2734
+
2735
+
2736
+
2737
+ <h5>Parameters:</h5>
2738
+
2739
+
2740
+ <table class="params">
2741
+ <thead>
2742
+ <tr>
2743
+
2744
+ <th>Name</th>
2745
+
2746
+
2747
+ <th>Type</th>
2748
+
2749
+
2750
+
2751
+
2752
+
2753
+ <th class="last">Description</th>
2754
+ </tr>
2755
+ </thead>
2756
+
2757
+ <tbody>
2758
+
2759
+
2760
+ <tr>
2761
+
2762
+ <td class="name"><code>libraryName</code></td>
2763
+
2764
+
2765
+ <td class="type">
2766
+
2767
+
2768
+ <span class="param-type"><code>string</code></span>
2769
+
2770
+
2771
+
2772
+ </td>
2773
+
2774
+
2775
+
2776
+
2777
+
2778
+ <td class="description last">
2779
+ <p>The name of the library, which will be used as the name of the global
2780
+ variable in the UMD format. It should in the camel case.</p>
2781
+
2782
+ </td>
2783
+ </tr>
2784
+
2785
+
2786
+
2787
+ <tr>
2788
+
2789
+ <td class="name"><code>importMetaUrl</code></td>
2790
+
2791
+
2792
+ <td class="type">
2793
+
2794
+
2795
+ <span class="param-type"><code>string</code></span>
2796
+
2797
+
2798
+
2799
+ </td>
2800
+
2801
+
2802
+
2803
+
2804
+
2805
+ <td class="description last">
2806
+ <p>The URL of the <code>import.meta</code> of the caller module. It <strong>MUST</strong> be passed
2807
+ with the <code>import.meta.url</code> of the caller module.</p>
2808
+
2809
+ </td>
2810
+ </tr>
2811
+
2812
+
2813
+
2814
+ <tr>
2815
+
2816
+ <td class="name"><code>options</code></td>
2817
+
2818
+
2819
+ <td class="type">
2820
+
2821
+
2822
+ <span class="param-type"><code>object</code></span>
2823
+
2824
+
2825
+
2826
+ </td>
2827
+
2828
+
2829
+
2830
+
2831
+
2832
+ <td class="description last">
2833
+ <p>The additional options for building the library, as described above.</p>
2834
+
2835
+ </td>
2836
+ </tr>
2837
+
2838
+
2839
+ </tbody>
2840
+ </table>
2841
+
2842
+
2843
+
2844
+
2845
+
2846
+
2847
+
2848
+
2849
+
2850
+
2851
+
2852
+
2853
+
2854
+
2855
+
2856
+
2857
+ <div class="section-returns">
2858
+ <h5>Returns:</h5>
2859
+
2860
+
2861
+
2862
+ <dl class="param-type">
2863
+ <dt>
2864
+ Type:
2865
+ </dt>
2866
+ <dd>
2867
+
2868
+ <span class="param-type"><code>Array.&lt;object></code></span>
2869
+
2870
+
2871
+ </dd>
2872
+ </dl>
2873
+
2874
+
2875
+ <div class="param-desc">
2876
+ <p>the array of Rollup configurations for the library.</p>
2877
+ </div>
2878
+
2879
+
2880
+ </div>
2881
+
2882
+
2883
+
2884
+
2885
+
2886
+ </div>
2887
+
2888
+
2889
+
2890
+
2891
+
2892
+
2893
+ </article>
2894
+
2895
+ </section>
2896
+
2897
+
2898
+
2899
+
2900
+ </div>
2901
+
2902
+ <br class="clear">
2903
+
2904
+ <footer>
2905
+ Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a>
2906
+ on Sun Jan 05 2025 14:08:32 GMT+0800 (China Standard Time)
2907
+ using the <a href="https://github.com/Haixing-Hu/jsdoc-minami">customized Minami theme</a>.
2908
+ </footer>
2909
+
2910
+ <script>prettyPrint();</script>
2911
+ <script src="scripts/linenumber.js"></script>
2912
+ </body>
2913
+ </html>