Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/vue example new #1893

Merged
merged 22 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ module.exports = {
root: true,
extends: ["@toruslabs/eslint-config-typescript"],
parser: "@typescript-eslint/parser",
ignorePatterns: ["*.config.js", ".eslintrc.js"],
parserOptions: {
sourceType: "module",
ecmaVersion: 11,
ecmaVersion: 2022,
project: "./tsconfig.json",
},
ignorePatterns: ["*.config.js", "*.d.ts", ".eslintrc.js"],
env: {
es2020: true,
browser: true,
node: true,
mocha: true,
rules: {
camelcase: 0,
},
};
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
Expand Down
32 changes: 32 additions & 0 deletions demo/vue-app-new/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
extends: ["@toruslabs/vue"],
parser: "vue-eslint-parser",
ignorePatterns: ["*.config.js", ".eslintrc.js", "*.config.mts"],
parserOptions: {
parser: "@typescript-eslint/parser",
sourceType: "module",
ecmaVersion: 2022,
project: "./tsconfig.json",
},
env: {
browser: true,
node: true,
mocha: true,
},
rules: {
camelcase: 0,
"import/extensions": [
"error",
"ignorePackages",
{
js: "never",
jsx: "never",
ts: "never",
tsx: "never",
},
],
},
};
24 changes: 24 additions & 0 deletions demo/vue-app-new/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
6 changes: 6 additions & 0 deletions demo/vue-app-new/.prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# .prettierrc or .prettierrc.yaml
printWidth: 150
singleQuote: false
semi: true
htmlWhitespaceSensitivity: ignore
trailingComma: es5
5 changes: 5 additions & 0 deletions demo/vue-app-new/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
}
}
25 changes: 25 additions & 0 deletions demo/vue-app-new/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Web3Auth x Vue Demo App

## Quickstart

To use this demo app, you'll first have to build the Web3Auth packages.

### Build the `Web3Auth` packages

```bash
git clone https://github.com/Web3Auth/web3auth-web.git
cd web3auth-web
npm install
npm run bootstrap && npm run build
```

### Start the demo app

> Inside `web3auth-web` directory.

```bash
cd demo/vue-app
npm install
npm run dev
# localhost:8080
```
25 changes: 25 additions & 0 deletions demo/vue-app-new/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>
<html lang="en">
<head>
<script type="module">
import { Buffer } from "buffer";
import process from "process";
// window.global ||= window;
window.Buffer = Buffer;
window.process = process;
</script>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Web3Auth demo</title>
</head>
<body>
<noscript>
<strong>
We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading
Loading