Skip to content

Commit 0646325

Browse files
committed
introduce vue-messenger-demo using sdk
1 parent 6baf2b2 commit 0646325

23 files changed

+3305
-18
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"packages/messenger-web",
2626
"packages/cli",
2727
"packages/toplevel-alias",
28-
"packages/delivery-service"
28+
"packages/delivery-service",
29+
"packages/messenger-vue-demo"
2930
],
3031
"nohoist": [
3132
"**/react",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
2+
charset = utf-8
3+
indent_size = 2
4+
indent_style = space
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?
29+
30+
*.tsbuildinfo
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
{
3+
"$schema": "https://json.schemastore.org/prettierrc",
4+
"semi": false,
5+
"singleQuote": true,
6+
"printWidth": 100
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"Vue.volar",
4+
"dbaeumer.vscode-eslint",
5+
"EditorConfig.EditorConfig",
6+
"esbenp.prettier-vscode"
7+
]
8+
}

packages/messenger-vue-demo/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# messenger-vue-demo
2+
3+
This template should help get you started developing with Vue 3 in Vite.
4+
5+
## Recommended IDE Setup
6+
7+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8+
9+
## Type Support for `.vue` Imports in TS
10+
11+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
12+
13+
## Customize configuration
14+
15+
See [Vite Configuration Reference](https://vite.dev/config/).
16+
17+
## Project Setup
18+
19+
```sh
20+
yarn
21+
```
22+
23+
### Compile and Hot-Reload for Development
24+
25+
```sh
26+
yarn dev
27+
```
28+
29+
### Type-Check, Compile and Minify for Production
30+
31+
```sh
32+
yarn build
33+
```
34+
35+
### Lint with [ESLint](https://eslint.org/)
36+
37+
```sh
38+
yarn lint
39+
```

packages/messenger-vue-demo/env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import pluginVue from 'eslint-plugin-vue'
2+
import vueTsEslintConfig from '@vue/eslint-config-typescript'
3+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
4+
5+
export default [
6+
{
7+
name: 'app/files-to-lint',
8+
files: ['**/*.{ts,mts,tsx,vue}'],
9+
},
10+
11+
{
12+
name: 'app/files-to-ignore',
13+
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
14+
},
15+
16+
...pluginVue.configs['flat/essential'],
17+
...vueTsEslintConfig(),
18+
skipFormatting,
19+
]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="UTF-8">
5+
<link rel="icon" href="/favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Vue Chat App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "messenger-vue-demo",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite",
7+
"build": "run-p type-check \"build-only {@}\" --",
8+
"preview": "vite preview",
9+
"build-only": "vite build",
10+
"type-check": "vue-tsc --build --force",
11+
"lint": "eslint . --fix",
12+
"format": "prettier --write src/"
13+
},
14+
"dependencies": {
15+
"@dm3-org/dm3-js-sdk": "workspace:^",
16+
"@ethersproject/providers": "^5.7.2",
17+
"@vue/devtools-core": "^7.6.4",
18+
"vue": "^3.5.13",
19+
"vue-advanced-chat": "^2.1.0"
20+
},
21+
"devDependencies": {
22+
"@tsconfig/node22": "^22.0.0",
23+
"@types/node": "^22.9.0",
24+
"@vitejs/plugin-vue": "^5.1.4",
25+
"@vue/eslint-config-prettier": "^10.1.0",
26+
"@vue/eslint-config-typescript": "^14.1.3",
27+
"@vue/tsconfig": "^0.5.1",
28+
"eslint": "^9.14.0",
29+
"eslint-plugin-vue": "^9.30.0",
30+
"npm-run-all2": "^7.0.1",
31+
"prettier": "^3.3.3",
32+
"typescript": "~5.6.3",
33+
"vite": "^5.4.10",
34+
"vite-plugin-vue-devtools": "^7.5.4",
35+
"vue-tsc": "^2.1.10"
36+
}
37+
}

0 commit comments

Comments
 (0)