@visulima/packem 1.18.2 → 1.18.4
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/CHANGELOG.md +17 -0
- package/README.md +39 -0
- package/dist/cli/index.mjs +187 -0
- package/dist/config/index.cjs +1 -1
- package/dist/config/index.d.cts +2 -13
- package/dist/config/index.d.mts +2 -13
- package/dist/config/index.d.ts +2 -13
- package/dist/config/index.mjs +1 -1
- package/dist/config/utils/load-package-json.d.cts +8 -0
- package/dist/{utils → config/utils}/load-package-json.d.mts +2 -2
- package/dist/config/utils/load-package-json.d.ts +8 -0
- package/dist/config/utils/load-packem-config.d.mts +7 -0
- package/dist/config/utils/load-preset.d.mts +4 -0
- package/dist/config/utils/load-tsconfig.d.cts +7 -0
- package/dist/config/utils/load-tsconfig.d.mts +5 -0
- package/dist/config/utils/load-tsconfig.d.ts +7 -0
- package/dist/index.cjs +125 -0
- package/dist/index.d.cts +53 -0
- package/dist/index.d.mts +53 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.mjs +131 -0
- package/dist/packem/index.d.cts +1 -6
- package/dist/packem/index.d.mts +1 -6
- package/dist/packem/index.d.ts +1 -6
- package/dist/packem_shared/constants-CR0qfKZx.cjs +1 -0
- package/dist/packem_shared/{constants-DSQIKVQe.mjs → constants-CwJdgxph.mjs} +1 -1
- package/dist/rollup/plugins/esbuild/index.cjs +1 -1
- package/dist/rollup/plugins/esbuild/index.mjs +1 -1
- package/dist/rollup/plugins/oxc/oxc-transformer.cjs +1 -1
- package/dist/rollup/plugins/oxc/oxc-transformer.mjs +2 -2
- package/dist/rollup/plugins/sucrase/index.cjs +1 -1
- package/dist/rollup/plugins/sucrase/index.mjs +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.cjs +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.mjs +1 -1
- package/dist/types.d.cts +12 -1
- package/dist/types.d.mts +12 -1
- package/dist/types.d.ts +12 -1
- package/package.json +10 -10
- package/dist/cli.mjs +0 -187
- package/dist/hooks/preset/auto.d.cts +0 -5
- package/dist/hooks/preset/auto.d.ts +0 -5
- package/dist/hooks/preset/utils/infer-entries.d.cts +0 -14
- package/dist/hooks/preset/utils/infer-entries.d.ts +0 -14
- package/dist/hooks/preset/utils/overwrite-with-publish-config.d.cts +0 -6
- package/dist/hooks/preset/utils/overwrite-with-publish-config.d.ts +0 -6
- package/dist/hooks/preset/utils/resolve-preset.d.cts +0 -6
- package/dist/hooks/preset/utils/resolve-preset.d.mts +0 -4
- package/dist/hooks/preset/utils/resolve-preset.d.ts +0 -6
- package/dist/packem/index.cjs +0 -125
- package/dist/packem/index.mjs +0 -131
- package/dist/packem_shared/constants-C98jAkyM.cjs +0 -1
- package/dist/utils/find-packem-file.d.cts +0 -4
- package/dist/utils/find-packem-file.d.ts +0 -4
- package/dist/utils/load-package-json.d.cts +0 -8
- package/dist/utils/load-package-json.d.ts +0 -8
- /package/dist/{commands → cli/commands}/add.d.mts +0 -0
- /package/dist/{commands → cli/commands}/build.d.mts +0 -0
- /package/dist/{commands → cli/commands}/init.d.mts +0 -0
- /package/dist/{commands → cli/commands}/utils/css-loader-dependencies.d.mts +0 -0
- /package/dist/{cli.d.mts → cli/index.d.mts} +0 -0
- /package/dist/{hooks → config}/preset/auto.d.mts +0 -0
- /package/dist/{hooks → config}/preset/utils/infer-entries.d.mts +0 -0
- /package/dist/{hooks → config}/preset/utils/overwrite-with-publish-config.d.mts +0 -0
- /package/dist/{utils → config/utils}/find-packem-file.d.mts +0 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ConstructorOptions } from "@visulima/pail";
|
|
2
|
+
import type { BuildConfig, Environment, Mode } from "./types.d.mts";
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for Packem bundler
|
|
5
|
+
*
|
|
6
|
+
* @interface PackemOptions
|
|
7
|
+
* @extends {BuildConfig}
|
|
8
|
+
*/
|
|
9
|
+
export interface PackemOptions extends BuildConfig {
|
|
10
|
+
/**
|
|
11
|
+
* The environment to build for
|
|
12
|
+
* Determines the build environment configuration
|
|
13
|
+
*
|
|
14
|
+
* @default "production"
|
|
15
|
+
* @type {Environment}
|
|
16
|
+
* @memberof PackemOptions
|
|
17
|
+
*/
|
|
18
|
+
environment?: Environment;
|
|
19
|
+
/**
|
|
20
|
+
* Logger configuration options
|
|
21
|
+
* Used to customize the logging behavior and output format
|
|
22
|
+
*
|
|
23
|
+
* @type {ConstructorOptions<string, string>}
|
|
24
|
+
* @memberof PackemOptions
|
|
25
|
+
*/
|
|
26
|
+
logger?: ConstructorOptions<string, string>;
|
|
27
|
+
/**
|
|
28
|
+
* The mode to run Packem in
|
|
29
|
+
* Controls how the bundler processes and optimizes the code
|
|
30
|
+
*
|
|
31
|
+
* @default "build"
|
|
32
|
+
* @type {Mode}
|
|
33
|
+
* @memberof PackemOptions
|
|
34
|
+
*/
|
|
35
|
+
mode?: Mode;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Runs the Packem bundler with the specified options
|
|
39
|
+
*
|
|
40
|
+
* @param rootDirectory - The root directory of the project to bundle
|
|
41
|
+
* @param options - Configuration options for the bundler
|
|
42
|
+
* @returns Promise that resolves with the build result
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const result = await packem("./src", {
|
|
47
|
+
* mode: "build",
|
|
48
|
+
* environment: "production"
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare const packem: (rootDirectory: string, options?: PackemOptions) => Promise<void>;
|
|
53
|
+
export type { BuildContext, BuildContextBuildAssetAndChunk, BuildContextBuildEntry, BuildEntry, BuildHooks, BuildOptions, Environment, Mode, RollupBuildOptions, Runtime, TransformerName, TransformerFn, IsolatedDeclarationsTransformer, } from "./types.d.mts";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ConstructorOptions } from "@visulima/pail";
|
|
2
|
+
import type { BuildConfig, Environment, Mode } from "./types.d.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for Packem bundler
|
|
5
|
+
*
|
|
6
|
+
* @interface PackemOptions
|
|
7
|
+
* @extends {BuildConfig}
|
|
8
|
+
*/
|
|
9
|
+
export interface PackemOptions extends BuildConfig {
|
|
10
|
+
/**
|
|
11
|
+
* The environment to build for
|
|
12
|
+
* Determines the build environment configuration
|
|
13
|
+
*
|
|
14
|
+
* @default "production"
|
|
15
|
+
* @type {Environment}
|
|
16
|
+
* @memberof PackemOptions
|
|
17
|
+
*/
|
|
18
|
+
environment?: Environment;
|
|
19
|
+
/**
|
|
20
|
+
* Logger configuration options
|
|
21
|
+
* Used to customize the logging behavior and output format
|
|
22
|
+
*
|
|
23
|
+
* @type {ConstructorOptions<string, string>}
|
|
24
|
+
* @memberof PackemOptions
|
|
25
|
+
*/
|
|
26
|
+
logger?: ConstructorOptions<string, string>;
|
|
27
|
+
/**
|
|
28
|
+
* The mode to run Packem in
|
|
29
|
+
* Controls how the bundler processes and optimizes the code
|
|
30
|
+
*
|
|
31
|
+
* @default "build"
|
|
32
|
+
* @type {Mode}
|
|
33
|
+
* @memberof PackemOptions
|
|
34
|
+
*/
|
|
35
|
+
mode?: Mode;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Runs the Packem bundler with the specified options
|
|
39
|
+
*
|
|
40
|
+
* @param rootDirectory - The root directory of the project to bundle
|
|
41
|
+
* @param options - Configuration options for the bundler
|
|
42
|
+
* @returns Promise that resolves with the build result
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const result = await packem("./src", {
|
|
47
|
+
* mode: "build",
|
|
48
|
+
* environment: "production"
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare const packem: (rootDirectory: string, options?: PackemOptions) => Promise<void>;
|
|
53
|
+
export type { BuildContext, BuildContextBuildAssetAndChunk, BuildContextBuildEntry, BuildEntry, BuildHooks, BuildOptions, Environment, Mode, RollupBuildOptions, Runtime, TransformerName, TransformerFn, IsolatedDeclarationsTransformer, } from "./types.d.ts";
|