@rslib/core 0.0.3 → 0.0.5
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/compiled/picocolors/index.d.ts +22 -0
- package/compiled/picocolors/index.js +22 -2
- package/compiled/picocolors/license +1 -1
- package/compiled/picocolors/package.json +1 -1
- package/dist/index.js +582 -523
- package/dist-types/config.d.ts +5 -2
- package/dist-types/constant.d.ts +1 -0
- package/dist-types/types/config/index.d.ts +10 -4
- package/dist-types/utils/helper.d.ts +3 -0
- package/package.json +7 -7
package/dist-types/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RsbuildConfig, type RsbuildInstance } from '@rsbuild/core';
|
|
2
|
-
import type { AutoExternal, Format, PkgJson, RslibConfig, RslibConfigAsyncFn, RslibConfigExport, RslibConfigSyncFn } from './types';
|
|
2
|
+
import type { AutoExternal, BannerAndFooter, Format, PkgJson, RslibConfig, RslibConfigAsyncFn, RslibConfigExport, RslibConfigSyncFn } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* This function helps you to autocomplete configuration types.
|
|
5
5
|
* It accepts a Rslib config object, or a function that returns a config.
|
|
@@ -18,7 +18,10 @@ export declare const composeAutoExternalConfig: (options: {
|
|
|
18
18
|
pkgJson?: PkgJson;
|
|
19
19
|
userExternals?: NonNullable<RsbuildConfig["output"]>["externals"];
|
|
20
20
|
}) => RsbuildConfig;
|
|
21
|
-
export declare function
|
|
21
|
+
export declare function composeMinifyConfig(minify: NonNullable<RsbuildConfig['output']>['minify']): RsbuildConfig;
|
|
22
|
+
export declare function composeBannerFooterConfig(banner: BannerAndFooter, footer: BannerAndFooter): RsbuildConfig;
|
|
23
|
+
export declare function createConstantRsbuildConfig(): Promise<RsbuildConfig>;
|
|
24
|
+
export declare const composeModuleImportWarn: (request: string) => string;
|
|
22
25
|
export declare function composeCreateRsbuildConfig(rslibConfig: RslibConfig, path?: string): Promise<{
|
|
23
26
|
format: Format;
|
|
24
27
|
config: RsbuildConfig;
|
package/dist-types/constant.d.ts
CHANGED
|
@@ -12,15 +12,21 @@ export type AutoExternal = boolean | {
|
|
|
12
12
|
devDependencies?: boolean;
|
|
13
13
|
peerDependencies?: boolean;
|
|
14
14
|
};
|
|
15
|
+
export type BannerAndFooter = {
|
|
16
|
+
js?: string;
|
|
17
|
+
css?: string;
|
|
18
|
+
dts?: string;
|
|
19
|
+
};
|
|
15
20
|
export interface LibConfig extends RsbuildConfig {
|
|
16
21
|
bundle?: boolean;
|
|
17
22
|
format?: Format;
|
|
18
23
|
autoExtension?: boolean;
|
|
19
24
|
autoExternal?: AutoExternal;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
/** Support esX and browserslist query */
|
|
26
|
+
syntax?: Syntax;
|
|
27
|
+
externalHelpers?: boolean;
|
|
28
|
+
banner?: BannerAndFooter;
|
|
29
|
+
footer?: BannerAndFooter;
|
|
24
30
|
dts?: Dts;
|
|
25
31
|
}
|
|
26
32
|
export interface RslibConfig extends RsbuildConfig {
|
|
@@ -8,4 +8,7 @@ export declare const nodeBuiltInModules: Array<string | RegExp>;
|
|
|
8
8
|
export declare function calcLongestCommonPath(absPaths: string[]): Promise<string | null>;
|
|
9
9
|
export declare const readPackageJson: (rootPath: string) => undefined | PkgJson;
|
|
10
10
|
export declare const isObject: (obj: unknown) => obj is Record<string, any>;
|
|
11
|
+
export declare const isEmptyObject: (obj: object) => boolean;
|
|
12
|
+
export declare function pick<T, U extends keyof T>(obj: T, keys: ReadonlyArray<U>): Pick<T, U>;
|
|
13
|
+
export declare function omit<T extends object, U extends keyof T>(obj: T, keys: ReadonlyArray<U>): Omit<T, U>;
|
|
11
14
|
export { color };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rslib/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "The Rspack-based library build tool.",
|
|
5
5
|
"homepage": "https://rslib.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"compiled"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@rsbuild/core": "1.0.1-
|
|
36
|
-
"rsbuild-plugin-dts": "0.0.
|
|
35
|
+
"@rsbuild/core": "1.0.1-rc.4",
|
|
36
|
+
"rsbuild-plugin-dts": "0.0.5"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"fast-glob": "^3.3.2",
|
|
42
42
|
"fs-extra": "^11.2.0",
|
|
43
43
|
"memfs": "^4.11.1",
|
|
44
|
-
"picocolors": "1.0
|
|
45
|
-
"prebundle": "1.
|
|
46
|
-
"rslib": "npm:@rslib/core@0.0.
|
|
47
|
-
"rslog": "^1.2.
|
|
44
|
+
"picocolors": "1.1.0",
|
|
45
|
+
"prebundle": "1.2.2",
|
|
46
|
+
"rslib": "npm:@rslib/core@0.0.4",
|
|
47
|
+
"rslog": "^1.2.3",
|
|
48
48
|
"typescript": "^5.5.4",
|
|
49
49
|
"@rslib/tsconfig": "0.0.1"
|
|
50
50
|
},
|