@absolutejs/absolute 0.1.12 → 0.1.14

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.
@@ -7,5 +7,5 @@ type BuildConfig = {
7
7
  reactPagesDir?: string;
8
8
  htmlDir?: string;
9
9
  };
10
- export declare const build: ({ buildDir, assetsDir, reactIndexDir, javascriptDir, typeScriptDir, reactPagesDir, htmlDir }: BuildConfig) => Promise<Record<string, string>>;
10
+ export declare const build: ({ buildDir, assetsDir, reactIndexDir, javascriptDir, typeScriptDir, reactPagesDir, htmlDir }?: BuildConfig) => Promise<Record<string, string> | null>;
11
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/absolute",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "A fullstack meta-framework for building web applications with TypeScript",
5
5
  "repository": {
6
6
  "type": "git",
package/src/core/build.ts CHANGED
@@ -27,9 +27,18 @@ export const build = async ({
27
27
  typeScriptDir,
28
28
  reactPagesDir,
29
29
  htmlDir
30
- }: BuildConfig) => {
30
+ }: BuildConfig = {}) => {
31
31
  const start = performance.now();
32
32
  console.log("Building start");
33
+ console.log("Build config", {
34
+ buildDir,
35
+ assetsDir,
36
+ reactIndexDir,
37
+ javascriptDir,
38
+ typeScriptDir,
39
+ reactPagesDir,
40
+ htmlDir
41
+ });
33
42
 
34
43
  console.log("Creating build directory");
35
44
  const projectRoot = cwd();
@@ -45,6 +54,7 @@ export const build = async ({
45
54
  reactPagesDir && join(projectRoot, reactPagesDir);
46
55
  const htmlDirAbsolute = htmlDir && join(projectRoot, htmlDir);
47
56
 
57
+ console.log("projectRoot:", projectRoot);
48
58
  console.log("buildDirAbsolute:", buildDirAbsolute);
49
59
  console.log("assetsDirAbsolute:", assetsDirAbsolute);
50
60
  console.log("reactIndexDirAbsolute:", reactIndexDirAbsolute);
@@ -96,6 +106,11 @@ export const build = async ({
96
106
 
97
107
  console.log("Entry points", entryPaths);
98
108
 
109
+ if (entryPaths.length === 0) {
110
+ console.warn("No entry points found, skipping build");
111
+ return null;
112
+ }
113
+
99
114
  console.log("Building entry points");
100
115
  const { logs, outputs } = await bunBuild({
101
116
  entrypoints: entryPaths,