-
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 #57 from ChainSafe/lykhoyda/migrate_to_parcel2_web…
…_wallet Lykhoyda/migrate to parcel2 web wallet
- Loading branch information
Showing
55 changed files
with
3,736 additions
and
1,422 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 |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
run: yarn install --immutable | ||
|
||
- name: Build | ||
run: yarn build | ||
run: yarn demo-wallet:build | ||
|
||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
|
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 |
---|---|---|
|
@@ -14,13 +14,16 @@ | |
}, | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"serve": "yarn workspace @webzjs/demo-wallet run serve", | ||
"dev": "yarn run just:build-keys && yarn run snap:start & yarn run demo-wallet:dev", | ||
"build": "yarn workspace @webzjs/demo-wallet run build", | ||
"demo-wallet:dev": "yarn workspace @webzjs/demo-wallet run dev", | ||
"dev": "yarn workspace @webzjs/web-wallet run dev & yarn run snap:start", | ||
"demo-wallet:serve": "yarn workspace @webzjs/demo-wallet run serve", | ||
"demo-wallet:dev": "yarn run just:build-keys && yarn run snap:start & yarn run web-wallet:dev", | ||
"demo-wallet:build": "yarn workspace @webzjs/demo-wallet run build", | ||
"web-wallet:dev": "yarn workspace @webzjs/web-wallet run dev & yarn run snap:start", | ||
"web-wallet:build": "yarn workspace @webzjs/web-wallet run build", | ||
"test:e2e": "yarn workspace @webzjs/e2e-tests test", | ||
"snap:start": "yarn workspace @webzjs/zcash-snap run start", | ||
"snap:build": "yarn workspace @webzjs/zcash-snap run build", | ||
"just:build": "just build", | ||
"just:build-keys": "just build-keys" | ||
} | ||
} |
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 +1 @@ | ||
SNAP_ORIGIN="" | ||
SNAP_ORIGIN="local:http://localhost:8080" |
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,6 @@ | ||
{ | ||
"extends": "@parcel/config-default", | ||
"transformers": { | ||
"*.svg": ["...", "@parcel/transformer-svg-react"] | ||
} | ||
} |
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,5 @@ | ||
{ | ||
"plugins": { | ||
"@tailwindcss/postcss": {} | ||
} | ||
} |
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 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.
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 @@ | ||
import express from 'express'; | ||
import { fileURLToPath } from 'url'; | ||
import { dirname, join } from 'path'; | ||
import { Parcel } from '@parcel/core'; | ||
import history from 'connect-history-api-fallback'; | ||
import dotenv from 'dotenv'; | ||
|
||
dotenv.config(); | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); | ||
|
||
async function run() { | ||
const bundler = new Parcel({ | ||
entries: 'index.html', | ||
defaultConfig: '@parcel/config-default', | ||
mode: 'development', | ||
defaultTargetOptions: { | ||
distDir: 'dist', | ||
}, | ||
}); | ||
|
||
// Watch in background | ||
await bundler.watch((err) => { | ||
if (err) { | ||
console.error('Build error:', err.diagnostics); | ||
} else { | ||
console.log('Parcel build successful'); | ||
} | ||
}); | ||
|
||
const app = express(); | ||
|
||
// Set custom headers (for WASM multi-threading) | ||
app.use((req, res, next) => { | ||
res.setHeader('Cross-Origin-Opener-Policy', 'same-origin'); | ||
res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp'); | ||
next(); | ||
}); | ||
|
||
app.use(history()); | ||
app.use(express.static(join(__dirname, 'dist'))); | ||
|
||
app.listen(3000, () => { | ||
console.log('Server running on http://localhost:3000'); | ||
}); | ||
} | ||
|
||
run().catch((err) => { | ||
console.error(err); | ||
process.exit(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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.