Skip to content

Commit

Permalink
Use pnpm in example (#15)
Browse files Browse the repository at this point in the history
* Use pnpm in example

* Revamp CI
  • Loading branch information
kigawas committed Aug 22, 2023
1 parent c200b23 commit 3e94ffe
Show file tree
Hide file tree
Showing 6 changed files with 348 additions and 229 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- uses: actions-rs/toolchain@v1

- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
override: true
target: wasm32-unknown-unknown
- uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install wasm pack
run: cargo install wasm-pack || true
components: rustfmt, clippy

- uses: taiki-e/install-action@wasm-pack

- run: cargo generate-lockfile

- uses: Swatinem/rust-cache@v2

- name: Build
run: wasm-pack build --target web
Expand Down
26 changes: 10 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions-rs/toolchain@v1

- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
override: true
target: wasm32-unknown-unknown
- uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install wasm pack
run: cargo install wasm-pack || true
components: rustfmt, clippy

- uses: taiki-e/install-action@wasm-pack

- run: cargo generate-lockfile

- uses: Swatinem/rust-cache@v2

- name: Build
run: wasm-pack build --target web
Expand Down
6 changes: 3 additions & 3 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ This example shows how to use `ecies-wasm` with [vite](https://vitejs.dev/).

## Install

`yarn install`
`pnpm install`

## Run dev server

`yarn dev`
`pnpm dev`

## Build and preview

`yarn build && yarn preview`
`pnpm build && pnpm preview`

## Build local wasm package (optional)

Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"ecies-wasm": "^0.2.0"
},
"devDependencies": {
"vite": "^4.4.4"
"vite": "^4.4.9"
}
}
Loading

0 comments on commit 3e94ffe

Please sign in to comment.