Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 9 additions & 20 deletions hello-world/frontend/canister.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 1 addition & 4 deletions static-website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ canisters:
type: "@dfinity/asset-canister@<version>"
configuration:
build:
- npm install
- npm run build
dir: dist
```
Expand Down Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion static-website/cargo-generate.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[template]
exclude = ["public/logo.png"]

3 changes: 3 additions & 0 deletions static-website/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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