@effindomv2/create-fui-as-app 0.1.12 → 0.1.13

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.
@@ -1,2 +1,2 @@
1
- export declare const FUI_AS_VERSION = "0.1.9";
2
- export declare const RUNTIME_VERSION = "0.1.2";
1
+ export declare const FUI_AS_VERSION = "0.1.10";
2
+ export declare const RUNTIME_VERSION = "0.1.3";
@@ -1,2 +1,2 @@
1
- export const FUI_AS_VERSION = "0.1.9";
2
- export const RUNTIME_VERSION = "0.1.2";
1
+ export const FUI_AS_VERSION = "0.1.10";
2
+ export const RUNTIME_VERSION = "0.1.3";
@@ -21,6 +21,10 @@ test("createProject writes hello-world scaffold including AssemblyScript tsconfi
21
21
  const packageJson = JSON.parse(readFileSync(join(target, "package.json"), "utf8"));
22
22
  assert.equal(typeof packageJson.scripts.dev, "string");
23
23
  assert.equal(typeof packageJson.scripts.build, "string");
24
+ assert.equal(typeof packageJson.scripts.publish, "string");
25
+ assert.equal(typeof packageJson.scripts["publish:stage"], "string");
26
+ assert.equal(typeof packageJson.scripts["build:dev"], "string");
27
+ assert.equal(typeof packageJson.scripts["build:wasm:dev"], "string");
24
28
  assert.equal(typeof packageJson.scripts.test, "string");
25
29
  assert.equal(typeof packageJson.scripts["generate:host"], "string");
26
30
  assert.equal(readFileSync(join(target, "src", "HelloWorld.ts"), "utf8").includes("Hello world"), true);
@@ -48,6 +52,12 @@ test("createProject writes mvc scaffold when template is mvc", () => {
48
52
  const packageJson = JSON.parse(readFileSync(join(target, "package.json"), "utf8"));
49
53
  assert.equal(typeof packageJson.scripts["build:wasm:home"], "string");
50
54
  assert.equal(typeof packageJson.scripts["build:wasm:settings"], "string");
55
+ assert.equal(typeof packageJson.scripts.publish, "string");
56
+ assert.equal(typeof packageJson.scripts["publish:stage"], "string");
57
+ assert.equal(typeof packageJson.scripts["build:dev"], "string");
58
+ assert.equal(typeof packageJson.scripts["build:wasm:dev"], "string");
59
+ assert.equal(typeof packageJson.scripts["build:wasm:dev:home"], "string");
60
+ assert.equal(typeof packageJson.scripts["build:wasm:dev:settings"], "string");
51
61
  assert.equal(typeof packageJson.scripts["generate:host"], "string");
52
62
  assert.equal(readFileSync(join(target, "src", "routes", "home", "HomeController.ts"), "utf8").includes("HomeController"), true);
53
63
  assert.equal(readFileSync(join(target, "src", "routes", "HomeApp.ts"), "utf8").includes("createManagedApplication"), true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effindomv2/create-fui-as-app",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "Scaffold a minimal EffinDom v2 FUI-AS app",
@@ -13,7 +13,8 @@ This template is the smallest FUI-AS app shape:
13
13
  1. Build UI from `src/App.ts` with controls/nodes from `./fui/Fui`.
14
14
  2. Split real features into more files under `src/` and compose them in `App.ts`.
15
15
  3. If browser-owned capabilities are needed (for example shell APIs), add definitions in `src/host/*.ts` and run `npm run generate:host`.
16
- 4. Run `npm run dev` while iterating.
16
+ 4. Run `npm run dev` while iterating (uses debug AssemblyScript builds for faster rebuilds).
17
+ 5. Run `npm run publish` for an optimized release build staged under `published/`.
17
18
 
18
19
  ## Architecture intent
19
20
 
@@ -6,15 +6,20 @@
6
6
  "description": "Scaffolded FUI-AS hello-world app",
7
7
  "scripts": {
8
8
  "build": "npm run generate:host && npm run build:assets && npm run build:wasm && npm run build:harness",
9
+ "build:dev": "npm run generate:host && npm run build:assets && npm run build:wasm:dev && npm run build:harness",
10
+ "publish": "npm run generate:host && npm run build:assets && npm run build:wasm:publish && npm run build:harness && npm run publish:stage",
9
11
  "build:assets": "tsx scripts/prepare-runtime.ts",
10
12
  "build:wasm": "asc src/App.ts --config asconfig.json --target release",
13
+ "build:wasm:dev": "asc src/App.ts --config asconfig.json --target debug",
14
+ "build:wasm:publish": "asc src/App.ts --config asconfig.json --target release --optimizeLevel 3 --shrinkLevel 2 --noAssert",
11
15
  "build:harness": "esbuild harness.ts --bundle --format=esm --platform=browser --outfile=public/harness.js",
12
16
  "generate:host-services": "tsx ./node_modules/@effindomv2/fui-as/scripts/generate-host-services.ts src/host/host-services.ts appHostServices src/host/generated/HostServices.ts ../../fui/FuiPrimitives",
13
17
  "generate:host-events": "tsx ./node_modules/@effindomv2/fui-as/scripts/generate-host-events.ts src/host/host-events.ts appHostEvents src/host/generated/HostEvents.ts ../../fui/FuiPrimitives",
14
18
  "generate:host": "npm run generate:host-services && npm run generate:host-events",
15
- "watch": "chokidar \"src/**/*.ts\" \"harness.ts\" \"index.html\" \"asconfig.json\" --ignore \"src/host/generated/**\" -c \"npm run build\"",
19
+ "publish:stage": "rm -rf published && mkdir -p published && cp -R public/. published/ && cp -f index.html published/index.html",
20
+ "watch": "chokidar \"src/**/*.ts\" \"harness.ts\" \"index.html\" \"asconfig.json\" --ignore \"src/host/generated/**\" -c \"npm run build:dev\"",
16
21
  "serve": "serve public --listen 8080",
17
- "dev": "npm run build && concurrently -k -n watch,serve \"npm run watch\" \"npm run serve\"",
22
+ "dev": "npm run build:dev && concurrently -k -n watch,serve \"npm run watch\" \"npm run serve\"",
18
23
  "test": "npm run build && tsx scripts/smoke.ts"
19
24
  },
20
25
  "dependencies": {
@@ -24,4 +24,5 @@ The routed harness is optimized for fast navigation:
24
24
  1. Add/modify page behavior inside `home/` or `settings/` controllers/models/views.
25
25
  2. Add new routes by creating another `*App.ts` entrypoint plus a new route folder and route record in `harness.ts`.
26
26
  3. Keep shared browser bridge capabilities in `src/host/*.ts`, then regenerate with `npm run generate:host`.
27
- 4. Use `npm run dev` for local routed iteration.
27
+ 4. Use `npm run dev` for local routed iteration (uses debug AssemblyScript builds for faster rebuilds).
28
+ 5. Use `npm run publish` for an optimized release build staged under `published/`.
@@ -6,17 +6,26 @@
6
6
  "description": "Scaffolded FUI-AS routed app",
7
7
  "scripts": {
8
8
  "build": "npm run generate:host && npm run build:assets && npm run build:wasm && npm run build:harness",
9
+ "build:dev": "npm run generate:host && npm run build:assets && npm run build:wasm:dev && npm run build:harness",
10
+ "publish": "npm run generate:host && npm run build:assets && npm run build:wasm:publish && npm run build:harness && npm run publish:stage",
9
11
  "build:assets": "tsx scripts/prepare-runtime.ts",
10
12
  "build:wasm": "npm run build:wasm:home && npm run build:wasm:settings",
13
+ "build:wasm:dev": "npm run build:wasm:dev:home && npm run build:wasm:dev:settings",
14
+ "build:wasm:publish": "npm run build:wasm:publish:home && npm run build:wasm:publish:settings",
11
15
  "build:wasm:home": "asc src/routes/HomeApp.ts --config asconfig.json --target release --outFile public/home.wasm",
12
16
  "build:wasm:settings": "asc src/routes/SettingsApp.ts --config asconfig.json --target release --outFile public/settings.wasm",
17
+ "build:wasm:dev:home": "asc src/routes/HomeApp.ts --config asconfig.json --target debug --outFile public/home.wasm",
18
+ "build:wasm:dev:settings": "asc src/routes/SettingsApp.ts --config asconfig.json --target debug --outFile public/settings.wasm",
19
+ "build:wasm:publish:home": "asc src/routes/HomeApp.ts --config asconfig.json --target release --outFile public/home.wasm --optimizeLevel 3 --shrinkLevel 2 --noAssert",
20
+ "build:wasm:publish:settings": "asc src/routes/SettingsApp.ts --config asconfig.json --target release --outFile public/settings.wasm --optimizeLevel 3 --shrinkLevel 2 --noAssert",
13
21
  "build:harness": "esbuild harness.ts --bundle --format=esm --platform=browser --outfile=public/harness.js",
14
22
  "generate:host-services": "tsx ./node_modules/@effindomv2/fui-as/scripts/generate-host-services.ts src/host/host-services.ts appHostServices src/host/generated/HostServices.ts ../../fui/FuiPrimitives",
15
23
  "generate:host-events": "tsx ./node_modules/@effindomv2/fui-as/scripts/generate-host-events.ts src/host/host-events.ts appHostEvents src/host/generated/HostEvents.ts ../../fui/FuiPrimitives",
16
24
  "generate:host": "npm run generate:host-services && npm run generate:host-events",
17
- "watch": "chokidar \"src/**/*.ts\" \"harness.ts\" \"route-shell.html\" \"index.html\" \"asconfig.json\" --ignore \"src/host/generated/**\" -c \"npm run build\"",
25
+ "publish:stage": "rm -rf published && mkdir -p published && cp -R public/. published/ && cp -f index.html published/index.html && cp -f route-shell.html published/route-shell.html",
26
+ "watch": "chokidar \"src/**/*.ts\" \"harness.ts\" \"route-shell.html\" \"index.html\" \"asconfig.json\" --ignore \"src/host/generated/**\" -c \"npm run build:dev\"",
18
27
  "serve": "serve public --listen 8080",
19
- "dev": "npm run build && concurrently -k -n watch,serve \"npm run watch\" \"npm run serve\"",
28
+ "dev": "npm run build:dev && concurrently -k -n watch,serve \"npm run watch\" \"npm run serve\"",
20
29
  "test": "npm run build && tsx scripts/smoke.ts"
21
30
  },
22
31
  "dependencies": {