This is a WebView-based Web5 wallet app written using Vue.js.
VSCode + Vue - Official plugin (and NOT Vetur, or Volar).
TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc (a dependency in package.json) for type checking. In editors, we need Vue - Official plugin to make the TypeScript language service aware of .vue types.
npm
iOS:
- Xcode
Android:
- Android Studio
- JDK (Java Development Kit) 21 (NOT 23)
-
Clone the
web5-jsrepo,web5-jsrepo will be used as a direct dependency for this repo. -
Clone this repo as a peer repo to
web-js(i.e. both repo directories have the same parent directory). -
Under this root directory of the local
aliasedrepo run:npm install --legacy-peer-deps
NOTE: the
--legacy-peer-depsis to workaround a polyfill dependency issue
esbuild is used for development in browsers taking advantage of speed of `esbuild' which allows dynamic reloading:
npm run devInstead esbuild, rollup is used for production builds which then get bundled in the mobile platforms:
npm run buildOptional: You can also run
npm run previewto launch the production build and view it in a browser. This can be useful for sanity checking differences betweendevbuilds, if any.
Once a production build is ready (after running npm run build), we can now bundle up build as a mobile app using capacitor:
For iOS:
-
Generate the iOS
xcodeproject:npx cap sync
NOTE: this should be run every time you wish to deploy a new build to the phone or simulator.
-
Launch the project workspace file:
open ./ios/App/App.xcworkspace
-
Click on the "play" button to launch the app.
For Android:
npx cap run androidLint with ESLint
npm run lint