From 44be3dea25186512873916011e7edfdca6fa3107 Mon Sep 17 00:00:00 2001 From: "guillem.cordoba" Date: Thu, 13 Jun 2024 16:50:12 +0200 Subject: [PATCH] Fixes to the template --- .../{{zome_manifest.name}}/zome.nix.hbs | 5 ++++- templates/app/web-app/package.json.hbs | 2 +- .../app/web-app/ui/src/holochain-app.ts.hbs | 20 ++++--------------- templates/zome/web-app/package.json.hbs | 2 +- .../{{snake_case app_name}}/zome.nix.hbs | 7 +++++-- 5 files changed, 15 insertions(+), 21 deletions(-) diff --git a/templates/app/coordinator-zome/dnas/{{dna_role_name}}/zomes/coordinator/{{zome_manifest.name}}/zome.nix.hbs b/templates/app/coordinator-zome/dnas/{{dna_role_name}}/zomes/coordinator/{{zome_manifest.name}}/zome.nix.hbs index 59c57c3..05ed5a7 100644 --- a/templates/app/coordinator-zome/dnas/{{dna_role_name}}/zomes/coordinator/{{zome_manifest.name}}/zome.nix.hbs +++ b/templates/app/coordinator-zome/dnas/{{dna_role_name}}/zomes/coordinator/{{zome_manifest.name}}/zome.nix.hbs @@ -38,7 +38,10 @@ - name: {{zome_manifest.name}}_integrity dylib: ~ ''; - zomes = inputs.hc-infra.outputs.lib.filterZomes self'.packages; + zomes = { + {{zome_manifest.name}}_integrity = self'.packages.{{zome_manifest.name}}_integrity; + {{zome_manifest.name}} = packages.{{zome_manifest.name}}; + }; holochain = inputs'.holochain; }); crateCargoToml = ./Cargo.toml; diff --git a/templates/app/web-app/package.json.hbs b/templates/app/web-app/package.json.hbs index 4b3d2bd..d7e0ab8 100644 --- a/templates/app/web-app/package.json.hbs +++ b/templates/app/web-app/package.json.hbs @@ -11,7 +11,7 @@ "package": "nix build -L .#{{app_name}}.meta.release -o workdir/{{app_name}}.happ && pnpm -F ui package && hc web-app pack workdir" }, "devDependencies": { - "@holochain-playground/cli": "^0.1.1", + "@holochain-playground/cli": "^0.300.0-rc", "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@eslint/js": "^8.0.0", "concurrently": "^6.2.1", diff --git a/templates/app/web-app/ui/src/holochain-app.ts.hbs b/templates/app/web-app/ui/src/holochain-app.ts.hbs index 3961541..b6716e5 100644 --- a/templates/app/web-app/ui/src/holochain-app.ts.hbs +++ b/templates/app/web-app/ui/src/holochain-app.ts.hbs @@ -22,7 +22,7 @@ import '@holochain-open-dev/profiles/dist/elements/my-profile.js'; import '@shoelace-style/shoelace/dist/components/spinner/spinner.js'; import '@shoelace-style/shoelace/dist/components/icon-button/icon-button.js'; -import { rootRouterContext } from './context.ts'; +import { rootRouterContext } from './context.js'; import { appStyles } from './app-styles.js'; import './home-page.ts'; @@ -109,21 +109,9 @@ export class HolochainApp extends SignalWatcher(LitElement) { `; return html` -
-
- ${this.renderBackButton()} - ${msg("{{title_case app_name}}")} - - ${this.renderMyProfile()} -
- - - ${this.router.outlet()} - -
+ + ${this.router.outlet()} + `; } diff --git a/templates/zome/web-app/package.json.hbs b/templates/zome/web-app/package.json.hbs index e4d7200..d24a8d8 100644 --- a/templates/zome/web-app/package.json.hbs +++ b/templates/zome/web-app/package.json.hbs @@ -10,7 +10,7 @@ "build:happ": "nix build -L .#{{snake_case app_name}}_test_app -o workdir/{{app_name}}_test.happ" }, "devDependencies": { - "@holochain-playground/cli": "^0.1.1", + "@holochain-playground/cli": "^0.300.0-rc", "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@eslint/js": "^8.0.0", "concurrently": "^6.2.1", diff --git a/templates/zome/web-app/zomes/coordinator/{{snake_case app_name}}/zome.nix.hbs b/templates/zome/web-app/zomes/coordinator/{{snake_case app_name}}/zome.nix.hbs index 5d7742b..44a8f4f 100644 --- a/templates/zome/web-app/zomes/coordinator/{{snake_case app_name}}/zome.nix.hbs +++ b/templates/zome/web-app/zomes/coordinator/{{snake_case app_name}}/zome.nix.hbs @@ -6,7 +6,7 @@ , system , self' , ... - }: { + }: rec { packages.{{snake_case app_name}} = inputs.hc-infra.outputs.lib.rustZome { workspacePath = inputs.self.outPath; holochain = inputs'.holochain; @@ -38,7 +38,10 @@ - name: {{snake_case app_name}}_integrity dylib: ~ ''; - zomes = inputs.hc-infra.outputs.lib.filterZomes self'.packages; + zomes = { + {{snake_case app_name}}_integrity = self'.packages.{{snake_case app_name}}_integrity; + {{snake_case app_name}} = packages.{{snake_case app_name}}; + }; holochain = inputs'.holochain; }); crateCargoToml = ./Cargo.toml;