primate 0.15.2 → 0.15.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 +1 -1
- package/src/bin.js +1 -1
- package/src/commands/create.js +2 -0
- package/src/commands/dev.js +16 -0
- package/src/commands/exports.js +2 -1
- package/src/config.js +2 -2
- package/src/exports.js +2 -2
- /package/src/commands/{start.js → serve.js} +0 -0
package/package.json
CHANGED
package/src/bin.js
CHANGED
package/src/commands/create.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import register from "../register.js";
|
|
2
|
+
import compile from "../compile.js";
|
|
3
|
+
import publish from "../publish.js";
|
|
4
|
+
import route from "../route.js";
|
|
5
|
+
import serve from "../serve.js";
|
|
6
|
+
|
|
7
|
+
export default async env => {
|
|
8
|
+
// register handlers
|
|
9
|
+
await register(env);
|
|
10
|
+
// compile server-side code
|
|
11
|
+
await compile(env);
|
|
12
|
+
// publish client-side code
|
|
13
|
+
await publish(env);
|
|
14
|
+
// serve
|
|
15
|
+
serve({router: await route(env), ...env});
|
|
16
|
+
};
|
package/src/commands/exports.js
CHANGED
package/src/config.js
CHANGED
|
@@ -80,9 +80,9 @@ export default async (filename = "primate.config.js") => {
|
|
|
80
80
|
.replace("%body%", () => body)
|
|
81
81
|
.replace("%head%", () => `${head}${heads}`);
|
|
82
82
|
},
|
|
83
|
-
publish: async ({src, code, type = "", inline = false}) => {
|
|
83
|
+
publish: async ({src, code, type = "", inline = false, main}) => {
|
|
84
84
|
const integrity = await hash(code);
|
|
85
|
-
resources.push({src, code, type, inline, integrity});
|
|
85
|
+
resources.push({src, code, type, inline, integrity, main});
|
|
86
86
|
return integrity;
|
|
87
87
|
},
|
|
88
88
|
};
|
package/src/exports.js
CHANGED
|
File without changes
|