Skip to content

Commit 6b94c08

Browse files
authored
dev: update all tooling (#68)
Started this project very early in the Vue 3 lifecycle, using webpack instead of vite. This commit essentially scaffolds a brand new project with up-to-date tooling, then copies in application code
1 parent 43b1abd commit 6b94c08

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+19490
-34408
lines changed

.browserslistrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
2+
charset = utf-8
3+
indent_size = 2
4+
indent_style = space
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
end_of_line = lf
8+
max_line_length = 100

.eslintrc.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/ci.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Run CI Suite
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -14,15 +14,19 @@ jobs:
1414
cypress:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-node@v3
19-
with:
20-
node-version: 16
21-
cache: 'npm'
22-
- uses: cypress-io/github-action@224f894ce0b082eba28a3a4562f630c54a17b432
23-
with:
24-
start: npm run serve
25-
wait-on: 'http://localhost:8080'
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v6
19+
with:
20+
node-version: 22
21+
cache: 'npm'
22+
- run: npm install && npm run build
23+
- uses: cypress-io/github-action@224f894ce0b082eba28a3a4562f630c54a17b432
24+
with:
25+
config-file: cypress.config.ts
26+
start: npm run preview
27+
wait-on: 'http://localhost:4173'
28+
env:
29+
CYPRESS_BASE_URL: http://localhost:4173
2630

2731
deploy:
2832
# needs: cypress
@@ -31,7 +35,7 @@ jobs:
3135
- uses: actions/checkout@v4
3236
- uses: actions/setup-node@v3
3337
with:
34-
node-version: 16
38+
node-version: 22
3539
cache: 'npm'
3640
- name: set deployment parameters
3741
run: |

.gitignore

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,34 @@ node_modules
1313
.env.local
1414
.env.*.local
1515

16-
# Log files
16+
17+
# Logs
18+
logs
19+
*.log
1720
npm-debug.log*
1821
yarn-debug.log*
1922
yarn-error.log*
2023
pnpm-debug.log*
24+
lerna-debug.log*
25+
26+
node_modules
27+
.DS_Store
28+
dist
29+
dist-ssr
30+
coverage
31+
*.local
32+
33+
/cypress/videos/
34+
/cypress/screenshots/
2135

2236
# Editor directories and files
37+
.vscode/*
38+
!.vscode/extensions.json
2339
.idea
24-
.vscode
2540
*.suo
2641
*.ntvs*
2742
*.njsproj
2843
*.sln
2944
*.sw?
45+
46+
*.tsbuildinfo

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"semi": false,
4+
"singleQuote": true,
5+
"printWidth": 100
6+
}

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"Vue.volar",
4+
"vitest.explorer",
5+
"dbaeumer.vscode-eslint",
6+
"EditorConfig.EditorConfig",
7+
"esbenp.prettier-vscode"
8+
]
9+
}

README.md

Lines changed: 56 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,70 @@
11
# dl-viewer
22

3-
## Project setup
4-
```
3+
This template should help get you started developing with Vue 3 in Vite.
4+
5+
## Recommended IDE Setup
6+
7+
[VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8+
9+
## Recommended Browser Setup
10+
11+
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
12+
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13+
- [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14+
- Firefox:
15+
- [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16+
- [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
17+
18+
## Type Support for `.vue` Imports in TS
19+
20+
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.
21+
22+
## Customize configuration
23+
24+
See [Vite Configuration Reference](https://vite.dev/config/).
25+
26+
## Project Setup
27+
28+
```sh
529
npm install
630
```
731

8-
### Compiles and hot-reloads for development
32+
### Compile and Hot-Reload for Development
33+
34+
```sh
35+
npm run dev
936
```
10-
npm run serve
37+
38+
### Type-Check, Compile and Minify for Production
39+
40+
```sh
41+
npm run build
1142
```
1243

13-
### Compiles and minifies for production
44+
### Run Unit Tests with [Vitest](https://vitest.dev/)
45+
46+
```sh
47+
npm run test:unit
1448
```
15-
npm run build
49+
50+
### Run End-to-End Tests with [Cypress](https://www.cypress.io/)
51+
52+
```sh
53+
npm run test:e2e:dev
1654
```
1755

18-
### Lints and fixes files
56+
This runs the end-to-end tests against the Vite development server.
57+
It is much faster than the production build.
58+
59+
But it's still recommended to test the production build with `test:e2e` before deploying (e.g. in CI environments):
60+
61+
```sh
62+
npm run build
63+
npm run test:e2e
1964
```
65+
66+
### Lint with [ESLint](https://eslint.org/)
67+
68+
```sh
2069
npm run lint
2170
```
22-
23-
### Customize configuration
24-
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)