create-nodality 1.0.98 → 1.0.99

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.
Files changed (2) hide show
  1. package/bin/index.js +25 -0
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -139,6 +139,31 @@ new Text("Hello").set({
139
139
  `;
140
140
  writeFileSync(resolve(projectPath, "upload", "pages", "index.js"), uploadPageJs);
141
141
 
142
+ // upload/pages/index.designer.js — companion to index.js, kept in
143
+ // sync by \`npm run compile\` (which re-emits this file from the
144
+ // declarative tree in src/app.js). Scaffolded here as a starting
145
+ // point with the same body as index.js so the project boots with
146
+ // the round-trip already wired; users can sketch in src/app.js and
147
+ // recompile to overwrite this file without touching index.js.
148
+ const uploadPageDesignerJs = `// Auto-generated by \`nodality compile\` from src/app.js.
149
+ // Re-run \`npm run compile\` after editing src/app.js to regenerate.
150
+ // Edit upload/pages/index.js (the canonical source) by hand instead.
151
+ import { Text } from "nodality";
152
+
153
+ new Text("Hello").set({
154
+ size: "S1",
155
+ font: "Arial",
156
+ stroke: {
157
+ op: {
158
+ name: "blast",
159
+ color: "green",
160
+ width: "1px"
161
+ }
162
+ }
163
+ }).render("#mount");
164
+ `;
165
+ writeFileSync(resolve(projectPath, "upload", "pages", "index.designer.js"), uploadPageDesignerJs);
166
+
142
167
  // robots.txt — allow-all default + sitemap pointer. `nodality
143
168
  // prerender` writes upload/sitemap.xml on every build (1.0.168+),
144
169
  // so the URL declared here will resolve once you deploy.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nodality",
3
- "version": "1.0.98",
3
+ "version": "1.0.99",
4
4
  "description": "Project scaffolding tool for Nodality library",
5
5
  "bin": {
6
6
  "create-nodality": "bin/index.js"