Skip to content

Commit 2dd79dc

Browse files
Merge pull request #8 from MichaelCurrin/upgrade-to-vue-3
Upgrade to Vue 3
2 parents e2c0966 + a17e61f commit 2dd79dc

File tree

11 files changed

+42
-62
lines changed

11 files changed

+42
-62
lines changed

.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not dead

.eslintrc.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
},
6+
extends: ["plugin:vue/vue3-essential", "eslint:recommended", "@vue/prettier"],
7+
parserOptions: {
8+
ecmaVersion: 2020,
9+
},
10+
rules: {
11+
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
12+
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
13+
},
14+
};

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: master
66
paths-ignore:
77
- "docs/**"
8+
89
pull_request:
910
branches: master
1011
paths-ignore:

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Vue Quickstart
2-
> Starter template for a Vue 2 site - including docs and CI deploy to GH Pages
2+
> Starter template for a Vue 3 site - including docs and CI deploy to GH Pages
33
44
<!-- Badges generated with: https://michaelcurrin.github.io/badge-generator/ -->
5-
65
[![GH Pages Deploy](https://github.com/MichaelCurrin/vue-quickstart/workflows/GH%20Pages%20Deploy/badge.svg)](https://github.com/MichaelCurrin/vue-quickstart/actions)
76
[![GitHub tag](https://img.shields.io/github/tag/MichaelCurrin/vue-quickstart)](https://github.com/MichaelCurrin/vue-js-quickstart/tags/)
87
[![License](https://img.shields.io/badge/License-MIT-blue)](#license)
@@ -46,7 +45,7 @@ After you've looked at the demo screenshot and site, you are welcome to create y
4645

4746
## About
4847

49-
### What is Vue?
48+
### What is Vue?
5049

5150
> Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
5251
@@ -67,6 +66,8 @@ See [Vue](https://github.com/MichaelCurrin/learn-to-code/blob/master/en/topics/s
6766
This project was created using the Vue CLI:
6867

6968
```sh
69+
$ vue create my-project
70+
$ # OR if not installed.
7071
$ npx @vue/cli create my-project
7172
```
7273

@@ -102,6 +103,7 @@ That based on what you get in the Vue Router setup.
102103
- Vue-based projects:
103104
- [Vue TypeScript Quickstart](https://github.com/MichaelCurrin/vue-typescript-quickstart) - like this project but with TypeScript added.
104105
- [Vue Router Quickstart](https://github.com/MichaelCurrin/vue-router-quickstart) - like this project but with Vue Router added for a multi-page site.
106+
- [Vue Vuex Quickstart](https://github.com/MichaelCurrin/vue-vuex-quickstart) - like this project but with Vuex added.
105107
- [VuePress Quickstart](https://github.com/MichaelCurrin/vuepress-quickstart) - using VuePress, a static site generator built on a Vue.
106108
- [Nuxt Default Quickstart](https://github.com/MichaelCurrin/nuxt-default-quickstart) - using Nuxt, a mix between a SPA and a static site generator that is built on Vue.
107109
- [Vue Frontend Quickstart](https://github.com/MichaelCurrin/vue-frontend-quickstart) - a simple site that uses Vue on the frontend without Node or build step.

babel.config.js

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

docs/usage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Compile and start a hot-reloading dev server.
88

99
```sh
10-
$ yarn serve
10+
$ yarn start
1111
```
1212

1313
Open in the browser:
@@ -26,15 +26,15 @@ $ yarn build
2626
Now you can view the output in the unversioned `dist` directory.
2727

2828

29-
## Lint
29+
## Lint and format
3030

3131
Detect errors and warnings and fix where possible.
3232

3333
```sh
3434
$ yarn lint:fix
3535
```
3636

37-
Run linter but not fix up. Warnings will pass, but any errors will cause an error exit status - this is useful for a CI/CD flow.
37+
Run checks but do not fix up. Warnings will pass, but any errors will cause an error exit status - this is useful for a CI/CD flow.
3838

3939
```sh
4040
$ yarn lint:check

package.json

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,18 @@
1212
"postversion": "git push --follow-tags"
1313
},
1414
"dependencies": {
15-
"core-js": "^3.6.4",
16-
"vue": "^2.6.11"
15+
"vue": "^3.0.0"
1716
},
1817
"devDependencies": {
19-
"@vue/cli-plugin-babel": "~4.5.6",
20-
"@vue/cli-plugin-eslint": "~4.5.6",
21-
"@vue/cli-service": "~4.5.6",
18+
"@vue/cli-plugin-eslint": "~4.5.0",
19+
"@vue/cli-service": "~4.5.0",
20+
"@vue/compiler-sfc": "^3.0.0",
2221
"@vue/eslint-config-prettier": "^6.0.0",
23-
"babel-eslint": "^10.1.0",
2422
"eslint": "^6.7.2",
25-
"eslint-plugin-prettier": "^3.1.4",
26-
"eslint-plugin-vue": "^6.2.2",
27-
"prettier": "^2.1.1",
28-
"vue-template-compiler": "^2.6.11"
23+
"eslint-plugin-prettier": "^3.3.1",
24+
"eslint-plugin-vue": "^7.0.0",
25+
"prettier": "^2.2.1"
2926
},
3027
"author": "MichaelCurrin",
31-
"license": "MIT",
32-
"eslintConfig": {
33-
"root": true,
34-
"env": {
35-
"node": true
36-
},
37-
"extends": [
38-
"plugin:vue/essential",
39-
"eslint:recommended",
40-
"@vue/prettier"
41-
],
42-
"parserOptions": {
43-
"parser": "babel-eslint"
44-
},
45-
"rules": {}
46-
},
47-
"browserslist": [
48-
"> 1%",
49-
"last 2 versions",
50-
"not dead"
51-
]
28+
"license": "MIT"
5229
}

sample.png

-38.7 KB
Loading

src/App.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<template>
2-
<div id="app">
3-
<img alt="Vue logo" src="./assets/logo.png" />
4-
<HelloWorld msg="Vue.js Quickstart" />
5-
</div>
2+
<img alt="Vue logo" src="./assets/logo.png" />
3+
4+
<HelloWorld msg="Vue.js Quickstart" />
65
</template>
76

87
<script>

src/components/HelloWorld.vue

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
<p>
77
<a href="https://github.com/MichaelCurrin/vue-quickstart/generate">
88
<img
9-
src="https://img.shields.io/badge/Use_this_template-41b883?style=for-the-badge&logo=github"
9+
src="https://img.shields.io/badge/Generate-Use_this_template-41b883?logo=github&style=for-the-badge&labelColor=35495e"
1010
alt="Use this template"
1111
title="Use this template"
1212
/>
1313
</a>
1414
<br />
1515
<a href="https://github.com/MichaelCurrin/vue-quickstart/">
1616
<img
17-
src="https://img.shields.io/badge/Repo-Vue_quickstart-41b883?logo=github&labelColor=35495e"
17+
src="https://img.shields.io/badge/Repo-Vue_quickstart-41b883?logo=github&style=flat-square&labelColor=35495e"
1818
alt="GitHub repo"
1919
title="GitHub repo"
2020
/>
2121
</a>
2222
<a href="https://www.npmjs.com/package/vue">
2323
<img
24-
src="https://img.shields.io/github/package-json/dependency-version/MichaelCurrin/vue-quickstart/vue?logo=vue.js&color=41b883&labelColor=35495e"
24+
src="https://img.shields.io/github/package-json/dependency-version/MichaelCurrin/vue-quickstart/vue?logo=vue.js&style=flat-square&color=41b883&labelColor=35495e"
2525
alt="package - vue"
2626
title="package - vue"
2727
/>
@@ -40,14 +40,6 @@
4040

4141
<h3>Installed CLI Plugins</h3>
4242
<ul>
43-
<li>
44-
<a
45-
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel"
46-
target="_blank"
47-
rel="noopener"
48-
>babel</a
49-
>
50-
</li>
5143
<li>
5244
<a
5345
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint"

0 commit comments

Comments
 (0)