diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..214388f --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,3 @@ +> 1% +last 2 versions +not dead diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..6858315 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,14 @@ +module.exports = { + root: true, + env: { + node: true, + }, + extends: ["plugin:vue/vue3-essential", "eslint:recommended", "@vue/prettier"], + parserOptions: { + ecmaVersion: 2020, + }, + rules: { + "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", + "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", + }, +}; diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a91fa9..3958d6b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: branches: master paths-ignore: - "docs/**" + pull_request: branches: master paths-ignore: diff --git a/README.md b/README.md index 549a53a..1344435 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # Vue Quickstart -> Starter template for a Vue 2 site - including docs and CI deploy to GH Pages +> Starter template for a Vue 3 site - including docs and CI deploy to GH Pages - [![GH Pages Deploy](https://github.com/MichaelCurrin/vue-quickstart/workflows/GH%20Pages%20Deploy/badge.svg)](https://github.com/MichaelCurrin/vue-quickstart/actions) [![GitHub tag](https://img.shields.io/github/tag/MichaelCurrin/vue-quickstart)](https://github.com/MichaelCurrin/vue-js-quickstart/tags/) [![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 ## About -### What is Vue? +### What is Vue? > Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web. @@ -67,6 +66,8 @@ See [Vue](https://github.com/MichaelCurrin/learn-to-code/blob/master/en/topics/s This project was created using the Vue CLI: ```sh +$ vue create my-project +$ # OR if not installed. $ npx @vue/cli create my-project ``` @@ -102,6 +103,7 @@ That based on what you get in the Vue Router setup. - Vue-based projects: - [Vue TypeScript Quickstart](https://github.com/MichaelCurrin/vue-typescript-quickstart) - like this project but with TypeScript added. - [Vue Router Quickstart](https://github.com/MichaelCurrin/vue-router-quickstart) - like this project but with Vue Router added for a multi-page site. + - [Vue Vuex Quickstart](https://github.com/MichaelCurrin/vue-vuex-quickstart) - like this project but with Vuex added. - [VuePress Quickstart](https://github.com/MichaelCurrin/vuepress-quickstart) - using VuePress, a static site generator built on a Vue. - [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. - [Vue Frontend Quickstart](https://github.com/MichaelCurrin/vue-frontend-quickstart) - a simple site that uses Vue on the frontend without Node or build step. diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 162a3ea..0000000 --- a/babel.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - presets: ["@vue/cli-plugin-babel/preset"], -}; diff --git a/docs/usage.md b/docs/usage.md index 54b46fd..7432f99 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -7,7 +7,7 @@ Compile and start a hot-reloading dev server. ```sh -$ yarn serve +$ yarn start ``` Open in the browser: @@ -26,7 +26,7 @@ $ yarn build Now you can view the output in the unversioned `dist` directory. -## Lint +## Lint and format Detect errors and warnings and fix where possible. @@ -34,7 +34,7 @@ Detect errors and warnings and fix where possible. $ yarn lint:fix ``` -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. +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. ```sh $ yarn lint:check diff --git a/package.json b/package.json index adce587..dc57186 100644 --- a/package.json +++ b/package.json @@ -12,41 +12,18 @@ "postversion": "git push --follow-tags" }, "dependencies": { - "core-js": "^3.6.4", - "vue": "^2.6.11" + "vue": "^3.0.0" }, "devDependencies": { - "@vue/cli-plugin-babel": "~4.5.6", - "@vue/cli-plugin-eslint": "~4.5.6", - "@vue/cli-service": "~4.5.6", + "@vue/cli-plugin-eslint": "~4.5.0", + "@vue/cli-service": "~4.5.0", + "@vue/compiler-sfc": "^3.0.0", "@vue/eslint-config-prettier": "^6.0.0", - "babel-eslint": "^10.1.0", "eslint": "^6.7.2", - "eslint-plugin-prettier": "^3.1.4", - "eslint-plugin-vue": "^6.2.2", - "prettier": "^2.1.1", - "vue-template-compiler": "^2.6.11" + "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-vue": "^7.0.0", + "prettier": "^2.2.1" }, "author": "MichaelCurrin", - "license": "MIT", - "eslintConfig": { - "root": true, - "env": { - "node": true - }, - "extends": [ - "plugin:vue/essential", - "eslint:recommended", - "@vue/prettier" - ], - "parserOptions": { - "parser": "babel-eslint" - }, - "rules": {} - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not dead" - ] + "license": "MIT" } diff --git a/sample.png b/sample.png index c8e37ed..e2dec24 100644 Binary files a/sample.png and b/sample.png differ diff --git a/src/App.vue b/src/App.vue index 9f6b005..fdb62ca 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,8 +1,7 @@