create-nodality 1.0.90 → 1.0.91

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/bin/index.js CHANGED
@@ -107,6 +107,10 @@ export default {
107
107
  type: "module",
108
108
  scripts: {
109
109
  build: "webpack --config webpack.config.js",
110
+ // `prerender` is the SSG step — renders upload/*.html in place
111
+ // from upload/pages/*.js entries. Reads nodality.config.json
112
+ // (scaffolded below) for origin + optional locales/pages.
113
+ prerender: "nodality prerender",
110
114
  watch: "webpack --watch --config webpack.config.js",
111
115
  start: "live-server . --port=4000 --watch=dist,src",
112
116
  dev: "npm-run-all --parallel watch start"
@@ -128,6 +132,23 @@ export default {
128
132
  };
129
133
  writeFileSync(resolve(projectPath, "package.json"), JSON.stringify(pkg, null, 2));
130
134
 
135
+ // nodality.config.json — read by `nodality prerender`. Origin is
136
+ // a placeholder the user should change; everything else has a
137
+ // sensible default and can stay out of the file unless overridden.
138
+ // The empty `pages: []` means "auto-discover" (walk upload/*.html
139
+ // and pair with upload/pages/<name>.js or upload/<name>.js). For
140
+ // irregular pairs like `index.html → app.js`, fill in pages
141
+ // explicitly here.
142
+ const nodalityConfig = {
143
+ origin: `https://${projectName}.example.com`,
144
+ uploadDir: "upload",
145
+ tolerateAsyncErrors: false
146
+ };
147
+ writeFileSync(
148
+ resolve(projectPath, "nodality.config.json"),
149
+ JSON.stringify(nodalityConfig, null, 2)
150
+ );
151
+
131
152
  console.log("Installing dependencies...");
132
153
  execSync(`npm install`, { cwd: projectPath, stdio: "inherit" });
133
154
 
@@ -142,8 +163,13 @@ export default {
142
163
  console.log("\nUsage:\n");
143
164
  console.log(` cd ${projectName}`);
144
165
  console.log(" npm run build # Rebuild library bundle");
166
+ console.log(" npm run prerender # Prerender static HTML for production (SSG)");
145
167
  console.log(" npm run dev # Start dev server with live reload");
146
168
  console.log(" npm start # Serve project without watch");
169
+ console.log("");
170
+ console.log(
171
+ ` Edit ${color1abc9c}nodality.config.json${reset} to set your public origin before running prerender.`
172
+ );
147
173
  }
148
174
 
149
175
  // Get project name from CLI args
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nodality",
3
- "version": "1.0.90",
3
+ "version": "1.0.91",
4
4
  "description": "Project scaffolding tool for Nodality library",
5
5
  "bin": {
6
6
  "create-nodality": "bin/index.js"
package/release.sh ADDED
@@ -0,0 +1,11 @@
1
+ next_version=33
2
+ full_version="1.0.0-beta.${next_version}"
3
+
4
+ # ✅ Update package version to full beta version
5
+ sed -i '' -E "s/(\"version\": \")1\.0\.0-beta\.[0-9]+\"/\1${full_version}\"/" package.json
6
+
7
+ # ✅ Update nodality dependency in package.json to ^1.0.0-beta.xx
8
+ sed -i '' -E "s/(\"nodality\": \")\^1\.0\.0-beta\.[0-9]+\"/\1\\^${full_version}\"/" package.json
9
+
10
+ # ✅ Update hardcoded nodality version in bin/index.js
11
+ sed -i '' -E "s/(nodality: \\\")\^1\.0\.0-beta\.[0-9]+(\\\")/\1\\^${full_version}\2/" bin/index.js
@@ -1,23 +0,0 @@
1
- name: Publish create-nodality
2
-
3
- on:
4
- workflow_dispatch: # <-- allows manual trigger
5
- push:
6
- tags:
7
- - 'v*.*.*'
8
-
9
- jobs:
10
- publish:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v4
14
-
15
- - uses: actions/setup-node@v4
16
- with:
17
- node-version: '18.20.0'
18
- registry-url: 'https://registry.npmjs.org'
19
-
20
- - name: Publish to NPM
21
- env:
22
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
23
- run: npm publish --access public
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 NodalityJS
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/README.md DELETED
@@ -1,2 +0,0 @@
1
- # create-nodality
2
- Nodality app scaffolding tool