From 0c24854cebe39dae2c45aa8fdadf5f09f12eb2c9 Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Wed, 25 Feb 2026 11:45:09 +0100 Subject: [PATCH 1/3] chore: add npm install to static-website build steps --- static-website/README.md | 5 +---- static-website/cargo-generate.toml | 3 --- static-website/icp.yaml | 3 +++ 3 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 static-website/cargo-generate.toml diff --git a/static-website/README.md b/static-website/README.md index d6888da..80cc4bd 100644 --- a/static-website/README.md +++ b/static-website/README.md @@ -17,6 +17,7 @@ canisters: type: "@dfinity/asset-canister@" configuration: build: + - npm install - npm run build dir: dist ``` @@ -58,10 +59,6 @@ canisters: ## Run It ```bash -# Install dependencies: -# Vite is required for this example to bundle assets -npm ci - # Start a local network icp network start -d diff --git a/static-website/cargo-generate.toml b/static-website/cargo-generate.toml deleted file mode 100644 index 15618db..0000000 --- a/static-website/cargo-generate.toml +++ /dev/null @@ -1,3 +0,0 @@ -[template] -exclude = ["public/logo.png"] - diff --git a/static-website/icp.yaml b/static-website/icp.yaml index d537c59..183a535 100644 --- a/static-website/icp.yaml +++ b/static-website/icp.yaml @@ -6,5 +6,8 @@ canisters: type: "@dfinity/asset-canister@v2.1.0" configuration: build: + # Install the dependencies + # Eventually you might want to use `npm ci` to lock your dependencies + - npm install - npm run build dir: dist From 51ff816c7f375c2bac8831e18ecda85d7b89bf8f Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Wed, 25 Feb 2026 11:46:31 +0100 Subject: [PATCH 2/3] chore: migrate hello-world frontend to recipe format --- hello-world/frontend/canister.yaml | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/hello-world/frontend/canister.yaml b/hello-world/frontend/canister.yaml index 61fa548..4b72291 100644 --- a/hello-world/frontend/canister.yaml +++ b/hello-world/frontend/canister.yaml @@ -2,28 +2,17 @@ name: frontend -build: - steps: - - type: pre-built - url: https://github.com/dfinity/sdk/raw/89243f2268b6d0ec77d589b7b1b27af931f70edd/src/distributed/assetstorage.wasm.gz - sha256: b312a16c3179cf8384afa852e468c1333b7439d4c5a39f26df69b12320f629f8 - +recipe: + # https://github.com/dfinity/icp-cli-recipes/blob/main/recipes/asset-canister/README.md + type: "@dfinity/asset-canister@v2.1.0" + configuration: + build: # Install the dependencies # Eventually you might want to use `npm ci` to lock your dependencies - - type: script - command: npm install - + - npm install # Generate the bindings from backend.did file in the backend canister # You could choose to run this once manually and checkin the generated code # instead of running it every single time - - type: script - command: npm run generate --prefix app - - - type: script - command: npm run build - -sync: - steps: - - type: assets - dirs: - - app/dist + - npm run generate --prefix app + - npm run build + dir: app/dist From 3df7982c573970d6466a77fb92ea3fd4529fd003 Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Wed, 25 Feb 2026 11:53:46 +0100 Subject: [PATCH 3/3] fix: restore cargo-generate.toml for static-website --- static-website/cargo-generate.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 static-website/cargo-generate.toml diff --git a/static-website/cargo-generate.toml b/static-website/cargo-generate.toml new file mode 100644 index 0000000..bbc7d9a --- /dev/null +++ b/static-website/cargo-generate.toml @@ -0,0 +1,2 @@ +[template] +exclude = ["public/logo.png"]