jiek 1.1.13 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +34 -84
- package/bin/jiek-build.js +16 -0
- package/dist/cli-only-build.cjs +743 -0
- package/dist/cli-only-build.d.cts +91 -0
- package/dist/cli-only-build.d.ts +91 -0
- package/dist/cli-only-build.js +735 -0
- package/dist/cli.cjs +211 -560
- package/dist/cli.d.cts +0 -69
- package/dist/cli.d.ts +0 -69
- package/dist/cli.js +211 -560
- package/dist/index.d.cts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/rollup/index.cjs +86 -46
- package/dist/rollup/index.js +86 -44
- package/package.json +54 -11
- package/src/cli-only-build.ts +7 -0
- package/src/cli.ts +1 -7
- package/src/commands/base.ts +13 -3
- package/src/commands/build.ts +197 -39
- package/src/commands/descriptions.ts +12 -0
- package/src/commands/meta.ts +5 -0
- package/src/rollup/base.ts +40 -0
- package/src/rollup/index.ts +106 -37
- package/src/utils/filterSupport.ts +2 -6
package/dist/cli.d.cts
CHANGED
@@ -1,72 +1,3 @@
|
|
1
|
-
import { InputPluginOption, OutputOptions } from 'rollup';
|
2
|
-
|
3
|
-
type Mapping2ROO<K extends keyof OutputOptions> = OutputOptions[K] | {
|
4
|
-
js?: OutputOptions[K];
|
5
|
-
dts?: OutputOptions[K];
|
6
|
-
};
|
7
|
-
interface ConfigGenerateContext {
|
8
|
-
path: string;
|
9
|
-
name: string;
|
10
|
-
input: string;
|
11
|
-
output: string;
|
12
|
-
external: (string | RegExp)[];
|
13
|
-
pkgIsModule: boolean;
|
14
|
-
conditionals: string[];
|
15
|
-
}
|
16
|
-
type OutputControl = boolean | ((context: ConfigGenerateContext) => boolean);
|
17
|
-
interface TemplateOptions {
|
18
|
-
/**
|
19
|
-
* When the user configures type: module, the generated output from entry points that don't
|
20
|
-
* have cts as a suffix will automatically include the CJS version.
|
21
|
-
* if it is not configured, and the generated output from entry points that do not have mts
|
22
|
-
* as a suffix will automatically include the ESM version.
|
23
|
-
*
|
24
|
-
* @default true
|
25
|
-
*/
|
26
|
-
crossModuleConvertor?: boolean;
|
27
|
-
output?: {
|
28
|
-
/**
|
29
|
-
* @default true
|
30
|
-
*
|
31
|
-
* When minify is set to true, the output will with minified files.
|
32
|
-
* When minify is set to 'only-minify', the output will direct output minified files.
|
33
|
-
*/
|
34
|
-
minify?: boolean | 'only-minify';
|
35
|
-
/**
|
36
|
-
* @default 'dist'
|
37
|
-
*/
|
38
|
-
dir?: Mapping2ROO<'dir'>;
|
39
|
-
sourcemap?: Mapping2ROO<'sourcemap'>;
|
40
|
-
strict?: Mapping2ROO<'strict'>;
|
41
|
-
js?: OutputControl;
|
42
|
-
dts?: OutputControl;
|
43
|
-
};
|
44
|
-
/**
|
45
|
-
* Set the external dependencies of the package.
|
46
|
-
*/
|
47
|
-
external?: (string | RegExp)[];
|
48
|
-
plugins?: InputPluginOption | ((type: 'js' | 'dts', context: ConfigGenerateContext) => InputPluginOption) | {
|
49
|
-
js: InputPluginOption;
|
50
|
-
dts?: InputPluginOption;
|
51
|
-
} | {
|
52
|
-
js?: InputPluginOption;
|
53
|
-
dts: InputPluginOption;
|
54
|
-
};
|
55
|
-
}
|
56
|
-
|
57
|
-
declare module 'jiek' {
|
58
|
-
interface Config {
|
59
|
-
build?: TemplateOptions & {
|
60
|
-
/**
|
61
|
-
* Whether to run in silent mode, only active when configured in the workspace root or cwd.
|
62
|
-
*
|
63
|
-
* @default false
|
64
|
-
*/
|
65
|
-
silent?: boolean;
|
66
|
-
};
|
67
|
-
}
|
68
|
-
}
|
69
|
-
|
70
1
|
declare module 'jiek' {
|
71
2
|
type InitNamedFunction = (argument: string, paths: {
|
72
3
|
full: string;
|
package/dist/cli.d.ts
CHANGED
@@ -1,72 +1,3 @@
|
|
1
|
-
import { InputPluginOption, OutputOptions } from 'rollup';
|
2
|
-
|
3
|
-
type Mapping2ROO<K extends keyof OutputOptions> = OutputOptions[K] | {
|
4
|
-
js?: OutputOptions[K];
|
5
|
-
dts?: OutputOptions[K];
|
6
|
-
};
|
7
|
-
interface ConfigGenerateContext {
|
8
|
-
path: string;
|
9
|
-
name: string;
|
10
|
-
input: string;
|
11
|
-
output: string;
|
12
|
-
external: (string | RegExp)[];
|
13
|
-
pkgIsModule: boolean;
|
14
|
-
conditionals: string[];
|
15
|
-
}
|
16
|
-
type OutputControl = boolean | ((context: ConfigGenerateContext) => boolean);
|
17
|
-
interface TemplateOptions {
|
18
|
-
/**
|
19
|
-
* When the user configures type: module, the generated output from entry points that don't
|
20
|
-
* have cts as a suffix will automatically include the CJS version.
|
21
|
-
* if it is not configured, and the generated output from entry points that do not have mts
|
22
|
-
* as a suffix will automatically include the ESM version.
|
23
|
-
*
|
24
|
-
* @default true
|
25
|
-
*/
|
26
|
-
crossModuleConvertor?: boolean;
|
27
|
-
output?: {
|
28
|
-
/**
|
29
|
-
* @default true
|
30
|
-
*
|
31
|
-
* When minify is set to true, the output will with minified files.
|
32
|
-
* When minify is set to 'only-minify', the output will direct output minified files.
|
33
|
-
*/
|
34
|
-
minify?: boolean | 'only-minify';
|
35
|
-
/**
|
36
|
-
* @default 'dist'
|
37
|
-
*/
|
38
|
-
dir?: Mapping2ROO<'dir'>;
|
39
|
-
sourcemap?: Mapping2ROO<'sourcemap'>;
|
40
|
-
strict?: Mapping2ROO<'strict'>;
|
41
|
-
js?: OutputControl;
|
42
|
-
dts?: OutputControl;
|
43
|
-
};
|
44
|
-
/**
|
45
|
-
* Set the external dependencies of the package.
|
46
|
-
*/
|
47
|
-
external?: (string | RegExp)[];
|
48
|
-
plugins?: InputPluginOption | ((type: 'js' | 'dts', context: ConfigGenerateContext) => InputPluginOption) | {
|
49
|
-
js: InputPluginOption;
|
50
|
-
dts?: InputPluginOption;
|
51
|
-
} | {
|
52
|
-
js?: InputPluginOption;
|
53
|
-
dts: InputPluginOption;
|
54
|
-
};
|
55
|
-
}
|
56
|
-
|
57
|
-
declare module 'jiek' {
|
58
|
-
interface Config {
|
59
|
-
build?: TemplateOptions & {
|
60
|
-
/**
|
61
|
-
* Whether to run in silent mode, only active when configured in the workspace root or cwd.
|
62
|
-
*
|
63
|
-
* @default false
|
64
|
-
*/
|
65
|
-
silent?: boolean;
|
66
|
-
};
|
67
|
-
}
|
68
|
-
}
|
69
|
-
|
70
1
|
declare module 'jiek' {
|
71
2
|
type InitNamedFunction = (argument: string, paths: {
|
72
3
|
full: string;
|