@akanjs/devkit 0.0.149 → 0.0.150
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/cjs/src/builder.js +4 -2
- package/esm/src/builder.js +4 -2
- package/package.json +1 -1
- package/src/executors.d.ts +2 -2
package/cjs/src/builder.js
CHANGED
|
@@ -34,6 +34,8 @@ var esbuild = __toESM(require("esbuild"));
|
|
|
34
34
|
var import_esbuild_plugin_d = require("esbuild-plugin-d.ts");
|
|
35
35
|
var import_fs = __toESM(require("fs"));
|
|
36
36
|
var import_extractDeps = require("./extractDeps");
|
|
37
|
+
const assetExtensions = [".css", ".md", ".js", ".png", ".ico", ".svg", ".json", ".template"];
|
|
38
|
+
const assetLoader = Object.fromEntries(assetExtensions.map((ext) => [ext, "copy"]));
|
|
37
39
|
class Builder {
|
|
38
40
|
#executor;
|
|
39
41
|
#distExecutor;
|
|
@@ -58,7 +60,7 @@ class Builder {
|
|
|
58
60
|
format,
|
|
59
61
|
outdir: `${this.#distExecutor.cwdPath}/${format}`,
|
|
60
62
|
logLevel: "error",
|
|
61
|
-
loader:
|
|
63
|
+
loader: assetLoader
|
|
62
64
|
};
|
|
63
65
|
}
|
|
64
66
|
#getAssetBuildOptions() {
|
|
@@ -72,7 +74,7 @@ class Builder {
|
|
|
72
74
|
],
|
|
73
75
|
outdir: this.#distExecutor.cwdPath,
|
|
74
76
|
logLevel: "error",
|
|
75
|
-
loader:
|
|
77
|
+
loader: assetLoader
|
|
76
78
|
};
|
|
77
79
|
}
|
|
78
80
|
async build(options = {}) {
|
package/esm/src/builder.js
CHANGED
|
@@ -2,6 +2,8 @@ import * as esbuild from "esbuild";
|
|
|
2
2
|
import { dtsPlugin } from "esbuild-plugin-d.ts";
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
import { extractDependencies } from "./extractDeps";
|
|
5
|
+
const assetExtensions = [".css", ".md", ".js", ".png", ".ico", ".svg", ".json", ".template"];
|
|
6
|
+
const assetLoader = Object.fromEntries(assetExtensions.map((ext) => [ext, "copy"]));
|
|
5
7
|
class Builder {
|
|
6
8
|
#executor;
|
|
7
9
|
#distExecutor;
|
|
@@ -26,7 +28,7 @@ class Builder {
|
|
|
26
28
|
format,
|
|
27
29
|
outdir: `${this.#distExecutor.cwdPath}/${format}`,
|
|
28
30
|
logLevel: "error",
|
|
29
|
-
loader:
|
|
31
|
+
loader: assetLoader
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
34
|
#getAssetBuildOptions() {
|
|
@@ -40,7 +42,7 @@ class Builder {
|
|
|
40
42
|
],
|
|
41
43
|
outdir: this.#distExecutor.cwdPath,
|
|
42
44
|
logLevel: "error",
|
|
43
|
-
loader:
|
|
45
|
+
loader: assetLoader
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
async build(options = {}) {
|
package/package.json
CHANGED
package/src/executors.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ export declare class WorkspaceExecutor extends Executor {
|
|
|
102
102
|
getBaseDevEnv(): {
|
|
103
103
|
repoName: string;
|
|
104
104
|
serveDomain: string;
|
|
105
|
-
env: "
|
|
105
|
+
env: "testing" | "local" | "debug" | "develop" | "main";
|
|
106
106
|
name?: string | undefined;
|
|
107
107
|
};
|
|
108
108
|
scan(): Promise<WorkspaceScanResult>;
|
|
@@ -215,7 +215,7 @@ export declare class AppExecutor extends SysExecutor {
|
|
|
215
215
|
emoji: string;
|
|
216
216
|
constructor({ workspace, name }: AppExecutorOptions);
|
|
217
217
|
static from(executor: SysExecutor | WorkspaceExecutor, name: string): AppExecutor;
|
|
218
|
-
getEnv(): "
|
|
218
|
+
getEnv(): "testing" | "local" | "debug" | "develop" | "main";
|
|
219
219
|
getConfig(command?: string): Promise<AppConfigResult>;
|
|
220
220
|
syncAssets(libDeps: string[]): Promise<void>;
|
|
221
221
|
}
|