-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from ChainSafe/willem/switch-to-vite
Switch to vite for demo-wallet and add deployment
- Loading branch information
Showing
18 changed files
with
1,014 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build and Deploy demo to Netlify | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ['main'] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Just | ||
uses: extractions/setup-just@v2 | ||
|
||
- name: install wasm-pack | ||
uses: jetli/[email protected] | ||
with: | ||
version: latest | ||
|
||
- name: build pkg | ||
run: just build | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- uses: pnpm/action-setup@v4 | ||
|
||
- name: Install dependencies | ||
run: pnpm i | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
with: | ||
publish-dir: './packages/demo-wallet/dist' | ||
production-branch: main | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
deploy-message: "Deploy from GitHub Actions" | ||
enable-pull-request-comment: false | ||
enable-commit-comment: true | ||
overwrites-pull-request-comment: true | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
timeout-minutes: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
{ | ||
"scripts": { | ||
"preinstall": "npx only-allow pnpm", | ||
"build": "parcel build --no-cache --no-autoinstall packages/demo-wallet", | ||
"serve": "pnpm --filter ./packages/demo-wallet run serve", | ||
"start:dev": "parcel --no-autoinstall packages/demo-wallet", | ||
"dev": "pnpm --filter ./packages/demo-wallet run dev", | ||
"build": "pnpm --filter ./packages/demo-wallet run build", | ||
"test:e2e": "pnpm --filter ./packages/e2e-tests test" | ||
}, | ||
"dependencies": { | ||
"@webzjs/webz-core": "workspace:^", | ||
"@webzjs/demo-wallet": "workspace:^" | ||
}, | ||
"devDependencies": { | ||
"@parcel/core": "^2.12.0", | ||
"parcel": "^2.12.0", | ||
"process": "^0.11.10" | ||
"@webzjs/demo-wallet": "workspace:^", | ||
"@webzjs/webz-core": "workspace:^" | ||
}, | ||
"packageManager": "[email protected]+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
Cross-Origin-Opener-Policy: same-origin | ||
Cross-Origin-Embedder-Policy: require-corp |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"useDefineForClassFields": true, | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"module": "ESNext", | ||
"skipLibCheck": true, | ||
|
||
/* Bundler mode */ | ||
"moduleResolution": "bundler", | ||
"allowImportingTsExtensions": true, | ||
"isolatedModules": true, | ||
"moduleDetection": "force", | ||
"noEmit": true, | ||
"jsx": "react-jsx", | ||
|
||
/* Linting */ | ||
// "strict": true, | ||
// "noUnusedLocals": true, | ||
// "noUnusedParameters": true, | ||
"noFallthroughCasesInSwitch": true | ||
}, | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"root":["./src/utils.ts","./src/app/actions.tsx","./src/app/app.tsx","./src/app/constants.tsx","./src/app/components/addaccount.tsx","./src/app/components/header.tsx","./src/app/components/receivefunds.tsx","./src/app/components/sendfunds.tsx","./src/app/components/settings.tsx","./src/app/components/summary.tsx"],"version":"5.6.2"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { defineConfig } from "vite"; | ||
import react from "@vitejs/plugin-react"; | ||
|
||
// https://vite.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
server: { | ||
headers: { | ||
// required to support web-workers spawning web-workers | ||
"Cross-Origin-Opener-Policy": "same-origin", | ||
"Cross-Origin-Embedder-Policy": "require-corp", | ||
}, | ||
}, | ||
build: { | ||
rollupOptions: { | ||
input: { | ||
main: "index.html", | ||
worker: "node_modules/@webzjs/webz-core/snippets/wasm-bindgen-rayon-3e04391371ad0a8e/src/workerHelpers.worker.js", | ||
}, | ||
}, | ||
manifest: true, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
78a63fa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://webz-demo.netlify.app as production
🚀 Deployed on https://6711cf6814d3e32ac43ca83f--webz-demo.netlify.app