Skip to content

Commit 81cfced

Browse files
Merge pull request #54 from Web3Auth/feat/example-vue
Feat/example vue
2 parents 4f17944 + fcac372 commit 81cfced

26 files changed

+10721
-1
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
},
55
"eslint.workingDirectories": [
66
{
7-
"directory": "example/*/*",
7+
"directory": "examples/*/*",
88
"changeProcessCWD": true
99
}
1010
],

examples/vue-app/.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
require("@rushstack/eslint-patch/modern-module-resolution");
2+
3+
module.exports = {
4+
root: true,
5+
extends: ["@toruslabs/vue"],
6+
parser: "vue-eslint-parser",
7+
ignorePatterns: ["*.config.js", ".eslintrc.js"],
8+
parserOptions: {
9+
parser: "@typescript-eslint/parser",
10+
sourceType: "module",
11+
ecmaVersion: 2022,
12+
project: "./tsconfig.json",
13+
},
14+
env: {
15+
browser: true,
16+
node: true,
17+
mocha: true,
18+
},
19+
rules: {
20+
camelcase: 0,
21+
"import/extensions": [
22+
"error",
23+
"ignorePackages",
24+
{
25+
js: "never",
26+
jsx: "never",
27+
ts: "never",
28+
tsx: "never",
29+
},
30+
],
31+
},
32+
};

examples/vue-app/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

examples/vue-app/.prettierrc.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# .prettierrc or .prettierrc.yaml
2+
printWidth: 150
3+
singleQuote: false
4+
semi: true
5+
htmlWhitespaceSensitivity: ignore
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll": "explicit"
4+
}
5+
}

examples/vue-app/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Web3Auth SFA x Vue Demo App
2+
3+
## Quickstart
4+
5+
To use this demo app, you'll first have to build the Web3Auth SFA packages.
6+
7+
### Build the `Web3Auth SFA` packages
8+
9+
```bash
10+
git clone https://github.com/Web3Auth/web3auth-web.git
11+
cd single-factor-auth-web
12+
npm install
13+
npm run build
14+
```
15+
16+
### Start the demo app
17+
18+
> Inside `single-factor-auth-web` directory.
19+
20+
```bash
21+
cd demo/vue-app
22+
npm install
23+
npm run dev
24+
# localhost:3000
25+
```

examples/vue-app/index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<script type="module">
5+
import { Buffer } from "buffer";
6+
import process from "process";
7+
// window.global ||= window;
8+
window.Buffer = Buffer;
9+
window.process = process;
10+
</script>
11+
<meta charset="UTF-8" />
12+
<link rel="icon" href="/favicon.ico" />
13+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
14+
<title>Web3Auth demo</title>
15+
</head>
16+
<body>
17+
<noscript>
18+
<strong>
19+
We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.
20+
</strong>
21+
</noscript>
22+
<div id="app"></div>
23+
<script type="module" src="/src/main.ts"></script>
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)