jiek 2.0.1 → 2.0.2-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/package.json +8 -5
  2. package/README.md +0 -78
  3. package/bin/jiek-build.js +0 -16
  4. package/bin/jiek.js +0 -13
  5. package/dist/cli-only-build.cjs +0 -743
  6. package/dist/cli-only-build.d.cts +0 -91
  7. package/dist/cli-only-build.d.ts +0 -91
  8. package/dist/cli-only-build.js +0 -735
  9. package/dist/cli.cjs +0 -4888
  10. package/dist/cli.d.cts +0 -67
  11. package/dist/cli.d.ts +0 -67
  12. package/dist/cli.js +0 -4857
  13. package/dist/index.cjs +0 -5
  14. package/dist/index.d.cts +0 -165
  15. package/dist/index.d.ts +0 -165
  16. package/dist/index.js +0 -3
  17. package/dist/rollup/index.cjs +0 -4893
  18. package/dist/rollup/index.d.cts +0 -10
  19. package/dist/rollup/index.d.ts +0 -10
  20. package/dist/rollup/index.js +0 -4880
  21. package/src/cli-only-build.ts +0 -7
  22. package/src/cli.ts +0 -3
  23. package/src/commands/base.ts +0 -18
  24. package/src/commands/build.ts +0 -462
  25. package/src/commands/descriptions.ts +0 -17
  26. package/src/commands/init.ts +0 -373
  27. package/src/commands/meta.ts +0 -5
  28. package/src/commands/publish.ts +0 -204
  29. package/src/index.ts +0 -8
  30. package/src/inner.ts +0 -11
  31. package/src/rollup/base.ts +0 -137
  32. package/src/rollup/index.ts +0 -565
  33. package/src/rollup/plugins/progress.ts +0 -26
  34. package/src/rollup/plugins/skip.ts +0 -21
  35. package/src/rollup/utils/commonOptions.ts +0 -9
  36. package/src/rollup/utils/externalResolver.ts +0 -35
  37. package/src/rollup/utils/globalResolver.ts +0 -13
  38. package/src/rollup/utils/withMinify.ts +0 -18
  39. package/src/utils/filterSupport.ts +0 -91
  40. package/src/utils/getExports.ts +0 -140
  41. package/src/utils/getRoot.ts +0 -16
  42. package/src/utils/getWD.ts +0 -31
  43. package/src/utils/loadConfig.ts +0 -111
  44. package/src/utils/recusiveListFiles.ts +0 -13
  45. package/src/utils/ts.ts +0 -94
  46. package/src/utils/tsRegister.ts +0 -26
@@ -1,91 +0,0 @@
1
- import * as _rollup_plugin_terser from '@rollup/plugin-terser';
2
- import * as rollup_plugin_swc3 from 'rollup-plugin-swc3';
3
- import * as rollup_plugin_esbuild from 'rollup-plugin-esbuild';
4
- import { InputPluginOption, OutputOptions } from 'rollup';
5
-
6
- type Mapping2ROO<K extends keyof OutputOptions> = OutputOptions[K] | {
7
- js?: OutputOptions[K];
8
- dts?: OutputOptions[K];
9
- };
10
- interface ConfigGenerateContext {
11
- path: string;
12
- name: string;
13
- input: string;
14
- output: string;
15
- external: (string | RegExp)[];
16
- pkgIsModule: boolean;
17
- conditionals: string[];
18
- }
19
- type OutputControl = boolean | ((context: ConfigGenerateContext) => boolean);
20
- declare const BUILDER_TYPES: readonly ["esbuild", "swc"];
21
- interface TemplateOptions {
22
- /**
23
- * When the user configures type: module, the generated output from entry points that don't
24
- * have cts as a suffix will automatically include the CJS version.
25
- * if it is not configured, and the generated output from entry points that do not have mts
26
- * as a suffix will automatically include the ESM version.
27
- *
28
- * @default true
29
- */
30
- crossModuleConvertor?: boolean;
31
- /**
32
- * Auto-detect the builder from the installed dependencies.
33
- * If the builder is not installed, it will prompt the user to install it.
34
- * If exists multiple builders, it will fall back to the 'esbuild'.
35
- *
36
- * @default 'esbuild'
37
- */
38
- builder?: typeof BUILDER_TYPES[number] | ({
39
- type: 'esbuild';
40
- } & rollup_plugin_esbuild.Options) | ({
41
- type: 'swc';
42
- } & rollup_plugin_swc3.PluginOptions);
43
- output?: {
44
- /**
45
- * @default true
46
- *
47
- * When minify is set to true, the output will with minified files.
48
- * When minify is set to 'only-minify', the output will direct output minified files.
49
- */
50
- minify?: boolean | 'only-minify';
51
- minifyOptions?: typeof BUILDER_TYPES[number] | 'terser' | ({
52
- type: 'terser';
53
- } & _rollup_plugin_terser.Options) | ({
54
- type: 'esbuild';
55
- } & Parameters<typeof rollup_plugin_esbuild.minify>[0]) | ({
56
- type: 'swc';
57
- } & Parameters<typeof rollup_plugin_swc3.minify>[0]);
58
- /**
59
- * @default 'dist'
60
- */
61
- dir?: Mapping2ROO<'dir'>;
62
- sourcemap?: Mapping2ROO<'sourcemap'>;
63
- strict?: Mapping2ROO<'strict'>;
64
- js?: OutputControl;
65
- dts?: OutputControl;
66
- };
67
- /**
68
- * Set the external dependencies of the package.
69
- */
70
- external?: (string | RegExp)[];
71
- plugins?: InputPluginOption | ((type: 'js' | 'dts', context: ConfigGenerateContext) => InputPluginOption) | {
72
- js: InputPluginOption;
73
- dts?: InputPluginOption;
74
- } | {
75
- js?: InputPluginOption;
76
- dts: InputPluginOption;
77
- };
78
- }
79
-
80
- declare module 'jiek' {
81
- interface Config {
82
- build?: TemplateOptions & {
83
- /**
84
- * Whether to run in silent mode, only active when configured in the workspace root or cwd.
85
- *
86
- * @default false
87
- */
88
- silent?: boolean;
89
- };
90
- }
91
- }
@@ -1,91 +0,0 @@
1
- import * as _rollup_plugin_terser from '@rollup/plugin-terser';
2
- import * as rollup_plugin_swc3 from 'rollup-plugin-swc3';
3
- import * as rollup_plugin_esbuild from 'rollup-plugin-esbuild';
4
- import { InputPluginOption, OutputOptions } from 'rollup';
5
-
6
- type Mapping2ROO<K extends keyof OutputOptions> = OutputOptions[K] | {
7
- js?: OutputOptions[K];
8
- dts?: OutputOptions[K];
9
- };
10
- interface ConfigGenerateContext {
11
- path: string;
12
- name: string;
13
- input: string;
14
- output: string;
15
- external: (string | RegExp)[];
16
- pkgIsModule: boolean;
17
- conditionals: string[];
18
- }
19
- type OutputControl = boolean | ((context: ConfigGenerateContext) => boolean);
20
- declare const BUILDER_TYPES: readonly ["esbuild", "swc"];
21
- interface TemplateOptions {
22
- /**
23
- * When the user configures type: module, the generated output from entry points that don't
24
- * have cts as a suffix will automatically include the CJS version.
25
- * if it is not configured, and the generated output from entry points that do not have mts
26
- * as a suffix will automatically include the ESM version.
27
- *
28
- * @default true
29
- */
30
- crossModuleConvertor?: boolean;
31
- /**
32
- * Auto-detect the builder from the installed dependencies.
33
- * If the builder is not installed, it will prompt the user to install it.
34
- * If exists multiple builders, it will fall back to the 'esbuild'.
35
- *
36
- * @default 'esbuild'
37
- */
38
- builder?: typeof BUILDER_TYPES[number] | ({
39
- type: 'esbuild';
40
- } & rollup_plugin_esbuild.Options) | ({
41
- type: 'swc';
42
- } & rollup_plugin_swc3.PluginOptions);
43
- output?: {
44
- /**
45
- * @default true
46
- *
47
- * When minify is set to true, the output will with minified files.
48
- * When minify is set to 'only-minify', the output will direct output minified files.
49
- */
50
- minify?: boolean | 'only-minify';
51
- minifyOptions?: typeof BUILDER_TYPES[number] | 'terser' | ({
52
- type: 'terser';
53
- } & _rollup_plugin_terser.Options) | ({
54
- type: 'esbuild';
55
- } & Parameters<typeof rollup_plugin_esbuild.minify>[0]) | ({
56
- type: 'swc';
57
- } & Parameters<typeof rollup_plugin_swc3.minify>[0]);
58
- /**
59
- * @default 'dist'
60
- */
61
- dir?: Mapping2ROO<'dir'>;
62
- sourcemap?: Mapping2ROO<'sourcemap'>;
63
- strict?: Mapping2ROO<'strict'>;
64
- js?: OutputControl;
65
- dts?: OutputControl;
66
- };
67
- /**
68
- * Set the external dependencies of the package.
69
- */
70
- external?: (string | RegExp)[];
71
- plugins?: InputPluginOption | ((type: 'js' | 'dts', context: ConfigGenerateContext) => InputPluginOption) | {
72
- js: InputPluginOption;
73
- dts?: InputPluginOption;
74
- } | {
75
- js?: InputPluginOption;
76
- dts: InputPluginOption;
77
- };
78
- }
79
-
80
- declare module 'jiek' {
81
- interface Config {
82
- build?: TemplateOptions & {
83
- /**
84
- * Whether to run in silent mode, only active when configured in the workspace root or cwd.
85
- *
86
- * @default false
87
- */
88
- silent?: boolean;
89
- };
90
- }
91
- }