@effindomv2/create-fui-as-app 0.1.1 → 0.1.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/dist/src/templates.js +9 -7
- package/package.json +1 -1
package/dist/src/templates.js
CHANGED
|
@@ -5,7 +5,7 @@ function formatJson(value) {
|
|
|
5
5
|
function renderPackageJson(context) {
|
|
6
6
|
return formatJson({
|
|
7
7
|
name: context.packageName,
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.3",
|
|
9
9
|
private: true,
|
|
10
10
|
type: "module",
|
|
11
11
|
scripts: {
|
|
@@ -149,7 +149,11 @@ const indexHtml = `<!doctype html>
|
|
|
149
149
|
<main data-effindom-canvas-size-source>
|
|
150
150
|
<canvas id="fui-canvas"></canvas>
|
|
151
151
|
</main>
|
|
152
|
-
<script
|
|
152
|
+
<script>
|
|
153
|
+
window.__effindomRuntime = Object.assign({}, window.__effindomRuntime, {
|
|
154
|
+
manifestUrl: "./runtime/dist/effindom.v2.manifest.json",
|
|
155
|
+
});
|
|
156
|
+
</script>
|
|
153
157
|
<script src="./runtime/dist/bridge.js"></script>
|
|
154
158
|
<script type="module" src="./harness.js"></script>
|
|
155
159
|
</body>
|
|
@@ -188,17 +192,15 @@ const tsconfigJson = `{
|
|
|
188
192
|
"include": ["src/**/*.ts"]
|
|
189
193
|
}
|
|
190
194
|
`;
|
|
191
|
-
const prepareRuntimeMjs = `import { copyFileSync, cpSync, mkdirSync, rmSync
|
|
195
|
+
const prepareRuntimeMjs = `import { copyFileSync, cpSync, mkdirSync, rmSync } from "node:fs";
|
|
192
196
|
|
|
193
197
|
const outputDir = "public";
|
|
194
198
|
rmSync(outputDir, { recursive: true, force: true });
|
|
195
199
|
mkdirSync(\`\${outputDir}/runtime\`, { recursive: true });
|
|
196
200
|
|
|
197
201
|
cpSync("node_modules/@effindomv2/runtime/dist", \`\${outputDir}/runtime/dist\`, { recursive: true });
|
|
202
|
+
cpSync("node_modules/@effindomv2/runtime/dist/fonts", \`\${outputDir}/runtime/fonts\`, { recursive: true });
|
|
198
203
|
copyFileSync("index.html", \`\${outputDir}/index.html\`);
|
|
199
|
-
|
|
200
|
-
const runtimeConfig = \`window.__effindomRuntime = Object.assign({}, window.__effindomRuntime, {\\\\n manifestUrl: "./runtime/dist/effindom.v2.manifest.json",\\\\n});\\\\n\`;
|
|
201
|
-
writeFileSync(\`\${outputDir}/effindom-runtime-config.js\`, runtimeConfig, "utf8");
|
|
202
204
|
`;
|
|
203
205
|
const smokeMjs = `import { accessSync } from "node:fs";
|
|
204
206
|
|
|
@@ -206,9 +208,9 @@ const expectedFiles = [
|
|
|
206
208
|
"public/index.html",
|
|
207
209
|
"public/harness.js",
|
|
208
210
|
"public/app.wasm",
|
|
209
|
-
"public/effindom-runtime-config.js",
|
|
210
211
|
"public/runtime/dist/bridge.js",
|
|
211
212
|
"public/runtime/dist/effindom.v2.manifest.json",
|
|
213
|
+
"public/runtime/fonts/NotoSans-Regular.ttf",
|
|
212
214
|
];
|
|
213
215
|
|
|
214
216
|
for (const filePath of expectedFiles) {
|