@normed/bundle 4.6.2 → 4.7.0
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 +4 -0
- package/README.md +111 -0
- package/bundles/EntryConfigInstance.d.ts +1 -1
- package/bundles/bin/cli.js +4387 -4231
- package/bundles/bin/cli.js.map +4 -4
- package/bundles/builders/copy.d.ts +1 -1
- package/bundles/builders/esbuilder.d.ts +1 -1
- package/bundles/builders/index.d.ts +1 -1
- package/bundles/bundle.d.ts +9 -9
- package/bundles/clean.d.ts +1 -1
- package/bundles/entrypoints.d.ts +2 -2
- package/bundles/esbuild-plugins/index.d.ts +5 -5
- package/bundles/esbuild-plugins/load_pug.d.ts +16 -0
- package/bundles/getOutExt.d.ts +2 -2
- package/bundles/index.d.ts +4 -4
- package/bundles/index.js +4392 -4251
- package/bundles/index.js.map +4 -4
- package/bundles/plugins.d.ts +2 -2
- package/bundles/readConfigs.d.ts +5 -4
- package/bundles/types.d.ts +4 -4
- package/bundles/utils.d.ts +1 -1
- package/package.json +28 -17
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Builder } from "../types";
|
|
1
|
+
import type { Builder } from "../types.ts";
|
|
2
2
|
export declare const copyBuilder: Builder;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Builder } from "../types";
|
|
1
|
+
import type { Builder } from "../types.ts";
|
|
2
2
|
export declare const esbuilder: Builder;
|
package/bundles/bundle.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import "@normed/json-types";
|
|
2
|
-
import { Entrypoint, APIOptions_Bundle } from "./types";
|
|
3
|
-
import { WrappedErrors } from "./errors";
|
|
4
|
-
import { BundlePlugins } from "./plugins";
|
|
2
|
+
import type { Entrypoint, APIOptions_Bundle } from "./types.ts";
|
|
3
|
+
import { WrappedErrors } from "./errors.ts";
|
|
4
|
+
import type { BundlePlugins } from "./plugins.ts";
|
|
5
5
|
export default function bundle(options?: APIOptions_Bundle, plugins?: BundlePlugins): Promise<WrappedErrors | {
|
|
6
6
|
completed: boolean;
|
|
7
7
|
errors: Error[];
|
|
8
8
|
warnings: Error[];
|
|
9
|
-
watchFiles: import("./File").FileInfo[];
|
|
9
|
+
watchFiles: import("./File.ts").FileInfo[];
|
|
10
10
|
watchDirs: {
|
|
11
11
|
path: string;
|
|
12
12
|
}[];
|
|
13
|
-
producedFiles: import("./File").FileInfo[];
|
|
13
|
+
producedFiles: import("./File.ts").FileInfo[];
|
|
14
14
|
entrypoints: Entrypoint[];
|
|
15
15
|
duration_ms: number;
|
|
16
16
|
children: ({
|
|
17
17
|
completed: boolean;
|
|
18
|
-
watchFiles: import("./File").FileInfo[];
|
|
18
|
+
watchFiles: import("./File.ts").FileInfo[];
|
|
19
19
|
watchDirs: {
|
|
20
20
|
path: string;
|
|
21
21
|
}[];
|
|
22
|
-
producedFiles: import("./File").FileInfo[];
|
|
23
|
-
} & import("./errors").ErrorLog & {
|
|
22
|
+
producedFiles: import("./File.ts").FileInfo[];
|
|
23
|
+
} & import("./errors.ts").ErrorLog & {
|
|
24
24
|
entrypoints: Entrypoint[];
|
|
25
|
-
builder: import("./types").Builder;
|
|
25
|
+
builder: import("./types.ts").Builder;
|
|
26
26
|
duration_ms: number;
|
|
27
27
|
})[];
|
|
28
28
|
}>;
|
package/bundles/clean.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { APIOptions_Clean } from "./types";
|
|
1
|
+
import type { APIOptions_Clean } from "./types.ts";
|
|
2
2
|
export default function clean(options?: APIOptions_Clean): Promise<void>;
|
package/bundles/entrypoints.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "@normed/json-types";
|
|
2
|
-
import { Entrypoint, BuildConfig } from "./types";
|
|
3
|
-
import { NoMatchingBuilder } from "./errors";
|
|
2
|
+
import type { Entrypoint, BuildConfig } from "./types.ts";
|
|
3
|
+
import { NoMatchingBuilder } from "./errors.ts";
|
|
4
4
|
export default function getEntrypoints(buildConfig: BuildConfig, manuallySpecified?: string[]): Promise<(NoMatchingBuilder | Entrypoint)[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as load_less } from "./load_less";
|
|
2
|
-
export { default as load_pug } from "./load_pug";
|
|
3
|
-
export { default as load_ts_js } from "./load_ts_js";
|
|
4
|
-
export { createCssExternalUrlsPlugin } from "./css_external_urls";
|
|
5
|
-
export { createCssUrlResolverPlugin } from "./css_url_resolver";
|
|
1
|
+
export { default as load_less } from "./load_less.ts";
|
|
2
|
+
export { default as load_pug } from "./load_pug.ts";
|
|
3
|
+
export { default as load_ts_js } from "./load_ts_js.ts";
|
|
4
|
+
export { createCssExternalUrlsPlugin } from "./css_external_urls.ts";
|
|
5
|
+
export { createCssUrlResolverPlugin } from "./css_url_resolver.ts";
|
|
@@ -13,6 +13,13 @@ export interface DiscoveredLessReference {
|
|
|
13
13
|
originalHref: string;
|
|
14
14
|
absolutePath: string;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Discovered JavaScript/TypeScript file reference from HTML.
|
|
18
|
+
*/
|
|
19
|
+
export interface DiscoveredScriptReference {
|
|
20
|
+
originalHref: string;
|
|
21
|
+
absolutePath: string;
|
|
22
|
+
}
|
|
16
23
|
/**
|
|
17
24
|
* Map of source pug file path to discovered pug references.
|
|
18
25
|
* This is populated during build and used by the builder to trigger sub-builds.
|
|
@@ -23,6 +30,11 @@ export declare const discoveredPugReferences: Map<string, DiscoveredPugReference
|
|
|
23
30
|
* This is populated during build and used by the builder to trigger sub-builds.
|
|
24
31
|
*/
|
|
25
32
|
export declare const discoveredLessReferences: Map<string, DiscoveredLessReference[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Map of source pug file path to discovered JavaScript/TypeScript references.
|
|
35
|
+
* This is populated during build and used by the builder to trigger sub-builds.
|
|
36
|
+
*/
|
|
37
|
+
export declare const discoveredScriptReferences: Map<string, DiscoveredScriptReference[]>;
|
|
26
38
|
/**
|
|
27
39
|
* Discovered package CSS reference from HTML.
|
|
28
40
|
* Package CSS files need to go through esbuild's CSS pipeline to handle url() references.
|
|
@@ -44,6 +56,10 @@ export declare function clearDiscoveredPugReferences(): void;
|
|
|
44
56
|
* Clear discovered less references. Should be called before a new build.
|
|
45
57
|
*/
|
|
46
58
|
export declare function clearDiscoveredLessReferences(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Clear discovered script references. Should be called before a new build.
|
|
61
|
+
*/
|
|
62
|
+
export declare function clearDiscoveredScriptReferences(): void;
|
|
47
63
|
/**
|
|
48
64
|
* Clear discovered package CSS references. Should be called before a new build.
|
|
49
65
|
*/
|
package/bundles/getOutExt.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { File } from "./File";
|
|
2
|
-
import type { Builder } from "./types";
|
|
1
|
+
import { File } from "./File.ts";
|
|
2
|
+
import type { Builder } from "./types.ts";
|
|
3
3
|
export declare function getOutExt(builder: Builder, infile: File): string;
|
package/bundles/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _clean from "./clean";
|
|
2
|
-
import _bundle from "./bundle";
|
|
3
|
-
import * as _builders from "./builders";
|
|
1
|
+
import _clean from "./clean.ts";
|
|
2
|
+
import _bundle from "./bundle.ts";
|
|
3
|
+
import * as _builders from "./builders/index.ts";
|
|
4
4
|
export declare const clean: typeof _clean;
|
|
5
5
|
export declare const bundle: typeof _bundle;
|
|
6
|
-
export type { APIOptions } from "./types";
|
|
6
|
+
export type { APIOptions } from "./types.ts";
|
|
7
7
|
export declare const verifyBuilder: typeof _builders.verifyBuilder;
|