@savvy-web/rspress-builder 0.8.0 → 0.9.0
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/index.d.ts +16 -6
- package/index.js +4 -2
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import { BuildConfig, BuildConfigInput, RunOptions, runBuild } from "@savvy-web/bundler";
|
|
2
2
|
|
|
3
3
|
//#region src/index.d.ts
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Per-bundle externals tuning for a single partition (plugin or runtime).
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
5
9
|
interface RspressBundleOptions {
|
|
6
10
|
/** Additional externals merged with the built-ins for that bundle. */
|
|
7
11
|
readonly externals?: ReadonlyArray<string>;
|
|
8
12
|
}
|
|
9
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Options for `definePlugin`. Deliberately small — RSPress plugins have a fixed shape.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
10
18
|
interface RspressPluginOptions {
|
|
11
19
|
/**
|
|
12
|
-
* Enable the `./runtime` bundle (browser, bundleless, CSS modules, React
|
|
20
|
+
* Enable the `./runtime` bundle (browser, bundleless, CSS modules, React/`@theme` external).
|
|
13
21
|
* `true` (default) builds it; `false` disables it; an object tunes its externals.
|
|
14
22
|
* This does not auto-detect the filesystem — pass `false` for a plugin with no runtime.
|
|
15
23
|
*/
|
|
16
24
|
readonly runtime?: boolean | RspressBundleOptions;
|
|
17
25
|
/** Tuning for the plugin (`.`) bundle (node, bundled). */
|
|
18
26
|
readonly plugin?: RspressBundleOptions;
|
|
19
|
-
/** Packages whose declarations are inlined into the bundled dts (e.g. [
|
|
27
|
+
/** Packages whose declarations are inlined into the bundled dts (e.g. [`@rspress/core`]). */
|
|
20
28
|
readonly dtsBundledPackages?: ReadonlyArray<string>;
|
|
21
29
|
/** API-model generation. Defaults to on (documents plugin options AND runtime components). `false` opts out. */
|
|
22
30
|
readonly apiModel?: BuildConfigInput["meta"];
|
|
@@ -34,8 +42,10 @@ interface RspressPluginOptions {
|
|
|
34
42
|
}
|
|
35
43
|
/**
|
|
36
44
|
* Build an RSPress plugin package: a Node plugin entry (`.`) plus a browser, bundleless,
|
|
37
|
-
* CSS-module React runtime entry (`./runtime`). Returns a standard
|
|
38
|
-
* hand it to
|
|
45
|
+
* CSS-module React runtime entry (`./runtime`). Returns a standard `BuildConfig`;
|
|
46
|
+
* hand it to `runBuild` from a self-executing `savvy.build.ts`.
|
|
47
|
+
*
|
|
48
|
+
* @public
|
|
39
49
|
*/
|
|
40
50
|
declare function definePlugin(options?: RspressPluginOptions): BuildConfig;
|
|
41
51
|
//#endregion
|
package/index.js
CHANGED
|
@@ -13,8 +13,10 @@ const RUNTIME_EXTERNALS = [
|
|
|
13
13
|
];
|
|
14
14
|
/**
|
|
15
15
|
* Build an RSPress plugin package: a Node plugin entry (`.`) plus a browser, bundleless,
|
|
16
|
-
* CSS-module React runtime entry (`./runtime`). Returns a standard
|
|
17
|
-
* hand it to
|
|
16
|
+
* CSS-module React runtime entry (`./runtime`). Returns a standard `BuildConfig`;
|
|
17
|
+
* hand it to `runBuild` from a self-executing `savvy.build.ts`.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
18
20
|
*/
|
|
19
21
|
function definePlugin(options = {}) {
|
|
20
22
|
const runtimeOpt = options.runtime ?? true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/rspress-builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "RSPress plugin builder for the Silk Suite, built on @savvy-web/bundler",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/rspress-builder",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"./package.json": "./package.json"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@savvy-web/bundler": "0.
|
|
34
|
-
"@savvy-web/tsdown-plugins": "0.
|
|
33
|
+
"@savvy-web/bundler": "0.9.0",
|
|
34
|
+
"@savvy-web/tsdown-plugins": "0.9.0",
|
|
35
35
|
"@tsdown/css": "^0.22.3"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@rspress/core": "^2.0.0",
|
|
39
|
-
"@types/node": "^
|
|
39
|
+
"@types/node": "^26.0.0",
|
|
40
40
|
"@types/react": "^19.2.0",
|
|
41
41
|
"@types/react-dom": "^19.2.0",
|
|
42
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
42
|
+
"@typescript/native-preview": "^7.0.0-dev.20260612.1",
|
|
43
43
|
"react": "^19.2.0",
|
|
44
44
|
"react-dom": "^19.2.0",
|
|
45
45
|
"typescript": "^6.0.0"
|