Skip to content

Commit

Permalink
feat: update vue test
Browse files Browse the repository at this point in the history
  • Loading branch information
heliomarpm committed May 1, 2024
1 parent d061efa commit 314060b
Show file tree
Hide file tree
Showing 34 changed files with 5,378 additions and 303 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
# - push
# - pull_request

# every day at 10:00 UTC
- cron: "35 16 * * 2"
# - cron: "35 16 * * 2"

push:
paths-ignore:
Expand Down Expand Up @@ -37,7 +36,7 @@ jobs:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
package_manager: [npm]
package_root: ["./test/app-in-root/", "./test/app-in-subdirectory/", "./test/vue-app"]
package_root: ["./test/app-in-root/", "./test/app-in-subdirectory/", "./test/vuevite-app"]

steps:
- name: Check out Git repository
Expand Down Expand Up @@ -74,5 +73,5 @@ jobs:
package_manager: ${{ matrix.package_manager }}
github_token: ${{ secrets.github_token }}
package_root: ${{ matrix.package_root }}
use_vue_cli: ${{ contains(matrix.package_root, 'vue')}}
use_vue_cli: ${{ contains(matrix.package_root, 'vuevite')}}
max_attempts: "2"
1 change: 0 additions & 1 deletion test/vue-app/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions test/vue-app/babel.config.js

This file was deleted.

54 changes: 0 additions & 54 deletions test/vue-app/package.json

This file was deleted.

Binary file removed test/vue-app/public/favicon.ico
Binary file not shown.
20 changes: 0 additions & 20 deletions test/vue-app/public/index.html

This file was deleted.

28 changes: 0 additions & 28 deletions test/vue-app/src/App.vue

This file was deleted.

Binary file removed test/vue-app/src/assets/logo.png
Binary file not shown.
94 changes: 0 additions & 94 deletions test/vue-app/src/background.js

This file was deleted.

80 changes: 0 additions & 80 deletions test/vue-app/src/components/HelloWorld.vue

This file was deleted.

8 changes: 0 additions & 8 deletions test/vue-app/src/main.js

This file was deleted.

11 changes: 0 additions & 11 deletions test/vue-app/vue.config.js

This file was deleted.

26 changes: 26 additions & 0 deletions test/vuevite-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
dist-electron
release
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions test/vuevite-app/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
18 changes: 18 additions & 0 deletions test/vuevite-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Vue 3 + TypeScript + Vite

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).

## Type Support For `.vue` Imports in TS

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 [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:

1. Disable the built-in TypeScript Extension
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
Loading

0 comments on commit 314060b

Please sign in to comment.