niral 0.1.5 → 0.1.7
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 +7 -3
- package/src/build/build.js +4 -0
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "niral",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Niral (நிரல்) — the zero-dependency full-stack web framework by ZyoraLabs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
|
-
"bin": {
|
|
7
|
+
"bin": {
|
|
8
|
+
"niral": "./bin/niral.js"
|
|
9
|
+
},
|
|
8
10
|
"files": [
|
|
9
11
|
"bin",
|
|
10
12
|
"src",
|
|
@@ -14,7 +16,9 @@
|
|
|
14
16
|
"LICENSE"
|
|
15
17
|
],
|
|
16
18
|
"license": "MIT",
|
|
17
|
-
"engines": {
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=22"
|
|
21
|
+
},
|
|
18
22
|
"scripts": {
|
|
19
23
|
"prepare:docs": "node apps/docs/prepare.server.js",
|
|
20
24
|
"sync:niralscript": "node scripts/sync-niralscript.mjs",
|
package/src/build/build.js
CHANGED
|
@@ -146,6 +146,10 @@ export function build({ root = ".", out } = {}) {
|
|
|
146
146
|
let release = stage;
|
|
147
147
|
try {
|
|
148
148
|
|
|
149
|
+
// Emitted server/client files use ESM `import`. Mark the release as ESM so Node
|
|
150
|
+
// treats its .js as modules regardless of the host app's package.json "type".
|
|
151
|
+
writeFileSync(join(release, "package.json"), '{ "type": "module" }\n');
|
|
152
|
+
|
|
149
153
|
/* ── write compiled modules + server blocks ── */
|
|
150
154
|
const manifestRoutes = [];
|
|
151
155
|
if (endpoints.length) writeEndpointModules(join(release, "server", "endpoints"), endpointFiles);
|