https://github.com/hardyscc/vue-test
https://github.com/hardyscc/vue-test
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hardyscc/vue-test
- Owner: hardyscc
- Created: 2017-11-15T07:51:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-27T02:28:35.000Z (over 8 years ago)
- Last Synced: 2025-01-14T00:32:57.083Z (over 1 year ago)
- Language: JavaScript
- Size: 266 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-t5
> A Vue.js project
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
## IDE Setup
```
brew cask install visual-studio-code
code --install-extension EditorConfig.EditorConfig
code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension octref.vetur
```
## Setup and empty project using vue-cli
* npm -g i vue-cli
* vue init webpack vue-test
* select airbnb
### .eslintrc.js
* npm i eslint-config-prettier
* add prettier under extends
* remove vue: 'never'
### jsconfig.json
```
{
"include": ["./src/**/*"],
"compilerOptions": {
"module": "es2015",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"allowJs": true,
"checkJs": true
}
}
```
### .prettierrc
```
{
"semi": false,
"singleQuote": true
}
```
### src/vue-shims.d.ts
```
declare module '*.vue' {
import Vue from 'vue'
export default Vue
}
```
### add .vue extension when import vue file
```
import App from './App.vue'
import HelloWorld from '@/components/HelloWorld.vue'
```