@rollipop/rolldown 0.0.0 → 1.0.0-rc.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/LICENSE +25 -0
- package/README.md +11 -1
- package/bin/cli.mjs +3 -0
- package/dist/cli-setup.d.mts +1 -0
- package/dist/cli-setup.mjs +17 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +1588 -0
- package/dist/config.d.mts +10 -0
- package/dist/config.mjs +14 -0
- package/dist/experimental-index.d.mts +181 -0
- package/dist/experimental-index.mjs +266 -0
- package/dist/experimental-runtime-types.d.ts +103 -0
- package/dist/filter-index.d.mts +197 -0
- package/dist/filter-index.mjs +369 -0
- package/dist/get-log-filter.d.mts +7 -0
- package/dist/get-log-filter.mjs +48 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +57 -0
- package/dist/parallel-plugin-worker.d.mts +1 -0
- package/dist/parallel-plugin-worker.mjs +32 -0
- package/dist/parallel-plugin.d.mts +14 -0
- package/dist/parallel-plugin.mjs +7 -0
- package/dist/parse-ast-index.d.mts +8 -0
- package/dist/parse-ast-index.mjs +4 -0
- package/dist/plugins-index.d.mts +30 -0
- package/dist/plugins-index.mjs +40 -0
- package/dist/shared/binding-B92Lq__Q.d.mts +1687 -0
- package/dist/shared/binding-tNJoEqAa.mjs +585 -0
- package/dist/shared/bindingify-input-options-CfhrNd_y.mjs +2233 -0
- package/dist/shared/constructors--k1uxZrh.d.mts +28 -0
- package/dist/shared/constructors-414MPkgB.mjs +61 -0
- package/dist/shared/define-config-BVG4QvnP.mjs +7 -0
- package/dist/shared/define-config-D8xP5iyL.d.mts +3463 -0
- package/dist/shared/load-config-Qtd9pHJ5.mjs +114 -0
- package/dist/shared/logging-wIy4zY9I.d.mts +50 -0
- package/dist/shared/logs-NH298mHo.mjs +183 -0
- package/dist/shared/misc-CCZIsXVO.mjs +22 -0
- package/dist/shared/normalize-string-or-regex-DeB7vQ75.mjs +61 -0
- package/dist/shared/parse-ast-index-BcP4Ts_P.mjs +99 -0
- package/dist/shared/prompt-tlfjalEt.mjs +847 -0
- package/dist/shared/rolldown-BMzJcmQ7.mjs +42 -0
- package/dist/shared/rolldown-build-DWeKtJOy.mjs +2371 -0
- package/dist/shared/watch-HmN4U4B9.mjs +379 -0
- package/package.json +128 -2
- package/.editorconfig +0 -10
- package/.gitattributes +0 -4
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-DWeKtJOy.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/api/rolldown/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* The API compatible with Rollup's `rollup` function.
|
|
6
|
+
*
|
|
7
|
+
* Unlike Rollup, the module graph is not built until the methods of the bundle object are called.
|
|
8
|
+
*
|
|
9
|
+
* @param input The input options object.
|
|
10
|
+
* @returns A Promise that resolves to a bundle object.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```js
|
|
14
|
+
* import { rolldown } from 'rolldown';
|
|
15
|
+
*
|
|
16
|
+
* let bundle, failed = false;
|
|
17
|
+
* try {
|
|
18
|
+
* bundle = await rolldown({
|
|
19
|
+
* input: 'src/main.js',
|
|
20
|
+
* });
|
|
21
|
+
* await bundle.write({
|
|
22
|
+
* format: 'esm',
|
|
23
|
+
* });
|
|
24
|
+
* } catch (e) {
|
|
25
|
+
* console.error(e);
|
|
26
|
+
* failed = true;
|
|
27
|
+
* }
|
|
28
|
+
* if (bundle) {
|
|
29
|
+
* await bundle.close();
|
|
30
|
+
* }
|
|
31
|
+
* process.exitCode = failed ? 1 : 0;
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @category Programmatic APIs
|
|
35
|
+
*/
|
|
36
|
+
const rolldown = async (input) => {
|
|
37
|
+
validateOption("input", input);
|
|
38
|
+
return new RolldownBuild(await PluginDriver.callOptionsHook(input));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { rolldown as t };
|