Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit 769bdeb

Browse files
feat:dwa-starter-vue-app-hello-word (#135)
* feat:dwa-starter-vue-app-hello-word * feat:dwa-starter-vue-app-hello-word * feat:dwa-starter-vue-app-hello-word * added tailwind css * added tailwind css * added tbd example json for ci integration * added tbd example json for ci integration * replaced npm with pnpm in ci/cd file * fix:pnpm build error in ci/cd * fix:pnpm build error in ci/cd * fix:pnpm build error in ci/cd * break the commands into seperate items * break the commands into seperate items
1 parent 8c09299 commit 769bdeb

29 files changed

+4275
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* eslint-env node */
2+
require('@rushstack/eslint-patch/modern-module-resolution')
3+
4+
module.exports = {
5+
root: true,
6+
'extends': [
7+
'plugin:vue/vue3-essential',
8+
'eslint:recommended',
9+
'@vue/eslint-config-typescript',
10+
'@vue/eslint-config-prettier/skip-formatting'
11+
],
12+
overrides: [
13+
{
14+
files: [
15+
'e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'
16+
],
17+
'extends': [
18+
'plugin:playwright/recommended'
19+
]
20+
}
21+
],
22+
parserOptions: {
23+
ecmaVersion: 'latest'
24+
}
25+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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
31+
32+
test-results/
33+
playwright-report/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"semi": false,
4+
"tabWidth": 2,
5+
"singleQuote": true,
6+
"printWidth": 100,
7+
"trailingComma": "none"
8+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "DWA Starter Vue",
3+
"tests": {
4+
"pre": [
5+
"npm install -g pnpm",
6+
"pnpm install",
7+
"pnpm run build",
8+
"npx playwright install --with-deps"
9+
],
10+
"commands": [
11+
"pnpm run test:unit",
12+
"pnpm run test:e2e"
13+
]
14+
}
15+
}
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+
"ms-playwright.playwright",
5+
"dbaeumer.vscode-eslint",
6+
"esbenp.prettier-vscode"
7+
]
8+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# dwa-starter-vue
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://vitejs.dev/config/).
16+
17+
## Project Setup
18+
19+
```sh
20+
pnpm install
21+
```
22+
23+
### Compile and Hot-Reload for Development
24+
25+
```sh
26+
pnpm dev
27+
```
28+
29+
### Type-Check, Compile and Minify for Production
30+
31+
```sh
32+
pnpm build
33+
```
34+
35+
### Run Unit Tests with [Vitest](https://vitest.dev/)
36+
37+
```sh
38+
pnpm test:unit
39+
```
40+
41+
### Run End-to-End Tests with [Playwright](https://playwright.dev)
42+
43+
```sh
44+
# Install browsers for the first run
45+
npx playwright install
46+
47+
# When testing on CI, must build the project first
48+
pnpm build
49+
50+
# Runs the end-to-end tests
51+
pnpm test:e2e
52+
# Runs the tests only on Chromium
53+
pnpm test:e2e --project=chromium
54+
# Runs the tests of a specific file
55+
pnpm test:e2e tests/example.spec.ts
56+
# Runs the tests in debug mode
57+
pnpm test:e2e --debug
58+
```
59+
60+
### Lint with [ESLint](https://eslint.org/)
61+
62+
```sh
63+
pnpm lint
64+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "@tsconfig/node20/tsconfig.json",
3+
"include": ["./**/*"]
4+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { test, expect } from '@playwright/test'
2+
3+
// See here how to get started:
4+
// https://playwright.dev/docs/intro
5+
test('visits the app root url', async ({ page }) => {
6+
await page.goto('/')
7+
await expect(page.locator('h1')).toHaveText('Hello World!')
8+
})
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<link rel="icon" href="/favicon.ico">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>DWA Starter</title>
9+
<meta name="description" content="A Decentralized Web Application template" />
10+
</head>
11+
12+
<body>
13+
<div id="app"></div>
14+
<script type="module" src="/src/main.ts"></script>
15+
</body>
16+
17+
</html>

0 commit comments

Comments
 (0)