primate 0.26.2 → 0.26.3

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.26.2",
3
+ "version": "0.26.3",
4
4
  "description": "Expressive, minimal and extensible web framework",
5
5
  "homepage": "https://primatejs.com",
6
6
  "bugs": "https://github.com/primatejs/primate/issues",
@@ -18,7 +18,7 @@
18
18
  "directory": "packages/primate"
19
19
  },
20
20
  "dependencies": {
21
- "rcompat": "^0.3.3"
21
+ "rcompat": "^0.3.4"
22
22
  },
23
23
  "engines": {
24
24
  "node": ">=18"
package/src/app.js CHANGED
@@ -104,11 +104,13 @@ export default async (log, root, config) => {
104
104
  if (compile === undefined) {
105
105
  const debased = `${component.path}`.replace(source, "");
106
106
 
107
- const server_target = this.runpath(server, components);
108
- await component.copy(server_target.join(debased));
107
+ const server_target = this.runpath(server, components, debased);
108
+ await server_target.directory.create();
109
+ await component.copy(server_target);
109
110
 
110
- const client_target = this.runpath(client, components);
111
- await component.copy(client_target.join(debased));
111
+ const client_target = this.runpath(client, components, debased);
112
+ await client_target.directory.create();
113
+ await component.copy(client_target);
112
114
  } else {
113
115
  // compile server components
114
116
  await compile.server(component);
@@ -9,9 +9,6 @@ const defaults = cwd(import.meta, 2).join("defaults");
9
9
  const pre = async app => {
10
10
  const { config: { location: { pages, client, components } }, path } = app;
11
11
 
12
- await Promise.all(["server", "client", "pages"]
13
- .map(directory => app.runpath(directory).create()));
14
-
15
12
  // copy framework pages
16
13
  await app.stage(defaults, pages, html);
17
14
  // overwrite transformed pages to build
@@ -7,6 +7,9 @@ import errors from "../errors.js";
7
7
  const pre = async app => {
8
8
  // remove build directory in case exists
9
9
  await app.path.build.remove();
10
+ await app.path.build.create();
11
+ await Promise.all(["server", "client", "pages", "components"]
12
+ .map(directory => app.runpath(directory).create()));
10
13
 
11
14
  return { ...app };
12
15
  };