2020-10-07 15:42:03 +01:00
|
|
|
# VueCheatsheet
|
|
|
|
|
2020-10-07 15:43:17 +01:00
|
|
|
A cheatsheet for getting started with Vue.js
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
- node / npm
|
|
|
|
|
|
|
|
|
|
|
|
## Commands
|
2020-10-07 21:49:16 +01:00
|
|
|
|
|
|
|
### Install Vue CLI
|
2020-10-07 15:43:17 +01:00
|
|
|
```bash
|
|
|
|
$ npm install -g @vue/cli
|
|
|
|
```
|
|
|
|
|
2020-10-07 21:49:16 +01:00
|
|
|
### Upgrade Vue CLI
|
2020-10-07 15:43:17 +01:00
|
|
|
```bash
|
|
|
|
$ npm install -g @vue/cli --upgrade
|
|
|
|
```
|
2020-10-07 21:46:23 +01:00
|
|
|
|
2020-10-07 21:49:16 +01:00
|
|
|
### Setup Vue project with "Router" and "Sass loader"
|
2020-10-07 21:46:23 +01:00
|
|
|
```bash
|
|
|
|
$ vue create my-app
|
|
|
|
$ cd my-app
|
|
|
|
$ vue add router
|
|
|
|
$ npm install sass-loader node-sass
|
|
|
|
```
|
|
|
|
|
2020-10-07 21:49:16 +01:00
|
|
|
### Run Vue project
|
2020-10-07 21:46:23 +01:00
|
|
|
```bash
|
|
|
|
$ npm run serve
|
|
|
|
```
|