primate 0.31.8 → 0.31.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primate",
3
- "version": "0.31.8",
3
+ "version": "0.31.10",
4
4
  "description": "Polymorphic development platform",
5
5
  "homepage": "https://primatejs.com",
6
6
  "bugs": "https://github.com/primatejs/primate/issues",
@@ -24,8 +24,8 @@ const post = async app => {
24
24
  // copy static files to build/server/static
25
25
  await app.stage(_static, FS.File.join(location.server, location.static));
26
26
 
27
- // copy static files to build/client/static
28
- await app.stage(_static, FS.File.join(location.client, location.static));
27
+ // copy static files to build/static
28
+ await app.stage(_static, FS.File.join(location.static));
29
29
 
30
30
  // publish JavaScript and CSS files
31
31
  const imports = await FS.File.collect(_static, /\.(?:css)$/u);
@@ -38,13 +38,15 @@ const post = async app => {
38
38
  // copy additional subdirectories to build/server
39
39
  await copy_includes(app, location.server);
40
40
 
41
- // copy components to build/components
42
- await app.stage(app.path.components, FS.File.join(location.components));
41
+ if (await app.path.components.exists()) {
42
+ // copy components to build/components
43
+ await app.stage(app.path.components, FS.File.join(location.components));
43
44
 
44
- const components = await app.runpath(location.components).collect();
45
+ const components = await app.runpath(location.components).collect();
45
46
 
46
- // from the build directory, compile to server and client
47
- await Promise.all(components.map(component => app.compile(component)));
47
+ // from the build directory, compile to server and client
48
+ await Promise.all(components.map(component => app.compile(component)));
49
+ }
48
50
 
49
51
  return app;
50
52
  };
package/src/start.js CHANGED
@@ -37,7 +37,7 @@ export default async ($app, mode = "development") => {
37
37
  app.build = new Build({
38
38
  ...o.exclude(app.get("build"), ["includes", "index", "transform"]),
39
39
  outdir: app.runpath(app.get("location.client")).path,
40
- resolveDir: app.root.path,
40
+ resolveDir: app.path.build.path,
41
41
  }, mode);
42
42
 
43
43
  const primate = await resolve(import.meta.url);