jiek 0.4.6 → 0.4.7-alpha.10
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +22 -1
- package/bin/jiek.js +9 -5
- package/dist/cli.cjs +4734 -406
- package/dist/cli.d.cts +97 -0
- package/dist/cli.d.ts +96 -1
- package/dist/cli.js +5006 -0
- package/dist/cli.min.cjs +19 -2
- package/dist/cli.min.js +19 -0
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +58 -0
- package/dist/index.d.ts +47 -46
- package/dist/{index.esm.js → index.js} +0 -1
- package/dist/index.min.cjs +0 -1
- package/dist/index.min.js +1 -0
- package/dist/rollup/index.cjs +4669 -0
- package/dist/rollup/index.d.cts +53 -0
- package/dist/rollup/index.d.ts +53 -0
- package/dist/rollup/index.js +4666 -0
- package/dist/rollup/index.min.cjs +19 -0
- package/dist/rollup/index.min.js +19 -0
- package/package.json +52 -33
- package/src/cli.ts +9 -0
- package/src/commands/base.ts +8 -0
- package/src/commands/build.ts +159 -0
- package/src/commands/init.ts +373 -0
- package/src/commands/publish.ts +156 -0
- package/src/index.ts +8 -0
- package/src/inner.ts +11 -0
- package/src/merge-package-json.ts +75 -0
- package/src/rollup/base.ts +72 -0
- package/src/rollup/index.ts +420 -0
- package/src/rollup/plugins/globals.ts +34 -0
- package/src/rollup/plugins/progress.ts +26 -0
- package/src/rollup/plugins/skip.ts +23 -0
- package/src/rollup/utils/commonOptions.ts +9 -0
- package/src/rollup/utils/externalResolver.ts +21 -0
- package/src/rollup/utils/globalResolver.ts +13 -0
- package/src/rollup/utils/withMinify.ts +18 -0
- package/src/utils/filterSupport.ts +84 -0
- package/src/utils/getExports.ts +100 -0
- package/src/utils/getRoot.ts +16 -0
- package/src/utils/getWD.ts +31 -0
- package/src/utils/loadConfig.ts +93 -0
- package/src/utils/tsRegister.ts +22 -0
- package/dist/base.esm.d.ts +0 -55
- package/dist/cli.cjs.map +0 -1
- package/dist/cli.esm.d.ts +0 -2
- package/dist/cli.esm.js +0 -9
- package/dist/cli.esm.js.map +0 -1
- package/dist/cli.esm.min.js +0 -2
- package/dist/cli.esm.min.js.map +0 -1
- package/dist/cli.min.cjs.map +0 -1
- package/dist/commands/base.esm.js +0 -5
- package/dist/commands/base.esm.js.map +0 -1
- package/dist/commands/base.esm.min.js +0 -2
- package/dist/commands/base.esm.min.js.map +0 -1
- package/dist/commands/build.esm.js +0 -58
- package/dist/commands/build.esm.js.map +0 -1
- package/dist/commands/build.esm.min.js +0 -2
- package/dist/commands/build.esm.min.js.map +0 -1
- package/dist/commands/init.esm.js +0 -271
- package/dist/commands/init.esm.js.map +0 -1
- package/dist/commands/init.esm.min.js +0 -2
- package/dist/commands/init.esm.min.js.map +0 -1
- package/dist/commands/publish.esm.js +0 -87
- package/dist/commands/publish.esm.js.map +0 -1
- package/dist/commands/publish.esm.min.js +0 -2
- package/dist/commands/publish.esm.min.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.esm.d.ts +0 -6
- package/dist/index.esm.js.map +0 -1
- package/dist/index.esm.min.js +0 -2
- package/dist/index.esm.min.js.map +0 -1
- package/dist/index.min.cjs.map +0 -1
- package/dist/inner.esm.js +0 -10
- package/dist/inner.esm.js.map +0 -1
- package/dist/inner.esm.min.js +0 -2
- package/dist/inner.esm.min.js.map +0 -1
- package/dist/merge-package-json.esm.js +0 -64
- package/dist/merge-package-json.esm.js.map +0 -1
- package/dist/merge-package-json.esm.min.js +0 -2
- package/dist/merge-package-json.esm.min.js.map +0 -1
- package/dist/pkg.esm.js +0 -4
- package/dist/pkg.esm.js.map +0 -1
- package/dist/pkg.esm.min.js +0 -2
- package/dist/pkg.esm.min.js.map +0 -1
- package/dist/rollup/plugins/globals.esm.js +0 -31
- package/dist/rollup/plugins/globals.esm.js.map +0 -1
- package/dist/rollup/plugins/globals.esm.min.js +0 -2
- package/dist/rollup/plugins/globals.esm.min.js.map +0 -1
- package/dist/rollup/plugins/skip.esm.js +0 -16
- package/dist/rollup/plugins/skip.esm.js.map +0 -1
- package/dist/rollup/plugins/skip.esm.min.js +0 -2
- package/dist/rollup/plugins/skip.esm.min.js.map +0 -1
- package/dist/rollup/utils/commonOptions.esm.js +0 -9
- package/dist/rollup/utils/commonOptions.esm.js.map +0 -1
- package/dist/rollup/utils/commonOptions.esm.min.js +0 -2
- package/dist/rollup/utils/commonOptions.esm.min.js.map +0 -1
- package/dist/rollup/utils/externalResolver.esm.js +0 -12
- package/dist/rollup/utils/externalResolver.esm.js.map +0 -1
- package/dist/rollup/utils/externalResolver.esm.min.js +0 -2
- package/dist/rollup/utils/externalResolver.esm.min.js.map +0 -1
- package/dist/rollup/utils/globalResolver.esm.js +0 -9
- package/dist/rollup/utils/globalResolver.esm.js.map +0 -1
- package/dist/rollup/utils/globalResolver.esm.min.js +0 -2
- package/dist/rollup/utils/globalResolver.esm.min.js.map +0 -1
- package/dist/rollup/utils/withMinify.esm.js +0 -15
- package/dist/rollup/utils/withMinify.esm.js.map +0 -1
- package/dist/rollup/utils/withMinify.esm.min.js +0 -2
- package/dist/rollup/utils/withMinify.esm.min.js.map +0 -1
- package/dist/rollup.cjs +0 -330
- package/dist/rollup.cjs.map +0 -1
- package/dist/rollup.d.ts +0 -23
- package/dist/rollup.esm.d.ts +0 -23
- package/dist/rollup.esm.js +0 -248
- package/dist/rollup.esm.js.map +0 -1
- package/dist/rollup.esm.min.js +0 -2
- package/dist/rollup.esm.min.js.map +0 -1
- package/dist/rollup.min.cjs +0 -2
- package/dist/rollup.min.cjs.map +0 -1
- package/dist/utils/commondir.esm.js +0 -25
- package/dist/utils/commondir.esm.js.map +0 -1
- package/dist/utils/commondir.esm.min.js +0 -2
- package/dist/utils/commondir.esm.min.js.map +0 -1
- package/dist/utils/filterSupport.esm.js +0 -67
- package/dist/utils/filterSupport.esm.js.map +0 -1
- package/dist/utils/filterSupport.esm.min.js +0 -2
- package/dist/utils/filterSupport.esm.min.js.map +0 -1
- package/dist/utils/getRoot.esm.js +0 -14
- package/dist/utils/getRoot.esm.js.map +0 -1
- package/dist/utils/getRoot.esm.min.js +0 -2
- package/dist/utils/getRoot.esm.min.js.map +0 -1
- package/dist/utils/getWD.esm.js +0 -31
- package/dist/utils/getWD.esm.js.map +0 -1
- package/dist/utils/getWD.esm.min.js +0 -2
- package/dist/utils/getWD.esm.min.js.map +0 -1
- package/dist/utils/loadConfig.esm.js +0 -75
- package/dist/utils/loadConfig.esm.js.map +0 -1
- package/dist/utils/loadConfig.esm.min.js +0 -2
- package/dist/utils/loadConfig.esm.min.js.map +0 -1
- package/dist/utils/tsRegister.esm.js +0 -24
- package/dist/utils/tsRegister.esm.js.map +0 -1
- package/dist/utils/tsRegister.esm.min.js +0 -2
- package/dist/utils/tsRegister.esm.min.js.map +0 -1
@@ -0,0 +1,53 @@
|
|
1
|
+
import { OutputOptions, RollupOptions } from 'rollup';
|
2
|
+
|
3
|
+
type Mapping2ROO<K extends keyof OutputOptions> = OutputOptions[K] | {
|
4
|
+
js?: OutputOptions[K];
|
5
|
+
dts?: OutputOptions[K];
|
6
|
+
};
|
7
|
+
interface TemplateOptions {
|
8
|
+
/**
|
9
|
+
* When the user configures type: module, the generated output from entry points that don't
|
10
|
+
* have cts as a suffix will automatically include the CJS version.
|
11
|
+
* if it is not configured, and the generated output from entry points that do not have mts
|
12
|
+
* as a suffix will automatically include the ESM version.
|
13
|
+
*
|
14
|
+
* @default true
|
15
|
+
*/
|
16
|
+
crossModuleConvertor?: boolean;
|
17
|
+
output?: {
|
18
|
+
/**
|
19
|
+
* @default true
|
20
|
+
*
|
21
|
+
* When minify is set to true, the output will with minified files.
|
22
|
+
* When minify is set to 'only-minify', the output will direct output minified files.
|
23
|
+
*/
|
24
|
+
minify?: boolean | 'only-minify';
|
25
|
+
/**
|
26
|
+
* @default 'dist'
|
27
|
+
*/
|
28
|
+
dir?: Mapping2ROO<'dir'>;
|
29
|
+
sourcemap?: Mapping2ROO<'sourcemap'>;
|
30
|
+
strict?: Mapping2ROO<'strict'>;
|
31
|
+
};
|
32
|
+
}
|
33
|
+
declare module 'jiek' {
|
34
|
+
interface Config {
|
35
|
+
build?: TemplateOptions & {
|
36
|
+
/**
|
37
|
+
* Whether to run in silent mode, only active when configured in the workspace root or cwd.
|
38
|
+
*
|
39
|
+
* @default false
|
40
|
+
*/
|
41
|
+
silent?: boolean;
|
42
|
+
};
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
interface PackageJSON {
|
47
|
+
name?: string;
|
48
|
+
type?: string;
|
49
|
+
exports?: Record<string, unknown> | string | string[];
|
50
|
+
}
|
51
|
+
declare function template(packageJSON: PackageJSON): RollupOptions[];
|
52
|
+
|
53
|
+
export { template };
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { OutputOptions, RollupOptions } from 'rollup';
|
2
|
+
|
3
|
+
type Mapping2ROO<K extends keyof OutputOptions> = OutputOptions[K] | {
|
4
|
+
js?: OutputOptions[K];
|
5
|
+
dts?: OutputOptions[K];
|
6
|
+
};
|
7
|
+
interface TemplateOptions {
|
8
|
+
/**
|
9
|
+
* When the user configures type: module, the generated output from entry points that don't
|
10
|
+
* have cts as a suffix will automatically include the CJS version.
|
11
|
+
* if it is not configured, and the generated output from entry points that do not have mts
|
12
|
+
* as a suffix will automatically include the ESM version.
|
13
|
+
*
|
14
|
+
* @default true
|
15
|
+
*/
|
16
|
+
crossModuleConvertor?: boolean;
|
17
|
+
output?: {
|
18
|
+
/**
|
19
|
+
* @default true
|
20
|
+
*
|
21
|
+
* When minify is set to true, the output will with minified files.
|
22
|
+
* When minify is set to 'only-minify', the output will direct output minified files.
|
23
|
+
*/
|
24
|
+
minify?: boolean | 'only-minify';
|
25
|
+
/**
|
26
|
+
* @default 'dist'
|
27
|
+
*/
|
28
|
+
dir?: Mapping2ROO<'dir'>;
|
29
|
+
sourcemap?: Mapping2ROO<'sourcemap'>;
|
30
|
+
strict?: Mapping2ROO<'strict'>;
|
31
|
+
};
|
32
|
+
}
|
33
|
+
declare module 'jiek' {
|
34
|
+
interface Config {
|
35
|
+
build?: TemplateOptions & {
|
36
|
+
/**
|
37
|
+
* Whether to run in silent mode, only active when configured in the workspace root or cwd.
|
38
|
+
*
|
39
|
+
* @default false
|
40
|
+
*/
|
41
|
+
silent?: boolean;
|
42
|
+
};
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
interface PackageJSON {
|
47
|
+
name?: string;
|
48
|
+
type?: string;
|
49
|
+
exports?: Record<string, unknown> | string | string[];
|
50
|
+
}
|
51
|
+
declare function template(packageJSON: PackageJSON): RollupOptions[];
|
52
|
+
|
53
|
+
export { template };
|