create-nodality 1.0.97 → 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.
- package/bin/index.js +36 -6
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -125,15 +125,45 @@ new Des()
|
|
|
125
125
|
// },
|
|
126
126
|
// });
|
|
127
127
|
|
|
128
|
-
new Text("Hello")
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
new Text("Hello").set({
|
|
129
|
+
size: "S1",
|
|
130
|
+
font: "Arial",
|
|
131
|
+
stroke: {
|
|
132
|
+
op: {
|
|
133
|
+
name: "blast",
|
|
134
|
+
color: "green",
|
|
135
|
+
width: "1px"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}).render("#mount");
|
|
134
139
|
`;
|
|
135
140
|
writeFileSync(resolve(projectPath, "upload", "pages", "index.js"), uploadPageJs);
|
|
136
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
|
+
|
|
137
167
|
// robots.txt — allow-all default + sitemap pointer. `nodality
|
|
138
168
|
// prerender` writes upload/sitemap.xml on every build (1.0.168+),
|
|
139
169
|
// so the URL declared here will resolve once you deploy.
|