Vue-cli installation
1 2 3 4 |
// vue-cli 2 npm install -g vue-cli // vue-cli 3 npm install -g @vue/cli-init |
with mac
1 |
sudo npm install -g vue-cli |
creating a project
1 2 3 4 |
// vue create project-name npm install -g @vue/cli-init # vue init now works exactly the same as vue-cli@2.x vue init webpack my-project |
vue-cli vuejs-templates
vue list
1 2 3 4 5 6 7 8 9 |
Joui-MacBook-Pro:workbench zzou$ vue list Available official templates: ★ browserify - A full-featured Browserify + vueify setup with hot-reload, linting & unit testing. ★ browserify-simple - A simple Browserify + vueify setup for quick prototyping. ★ pwa - PWA template for vue-cli based on the webpack template ★ simple - The simplest possible Vue setup in a single HTML file ★ webpack - A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction. ★ webpack-simple - A simple Webpack + vue-loader setup for quick prototyping. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
. ├─ README.md ├─ index.html ├─ webpack.config.js ├─ package.json └─ src ├─ main.js ├─ App.vue ├─ components │ ├─ common │ └─ ... ├─ routes router │ ├─ index.js │ └─ routes.js ├─ views router pages │ ├─ MainView.vue │ └─ ... ├─ store state │ ├─ auth │ ├─ index.js │ └─ ... ├─ api api │ ├─ index.js │ ├─ users.js │ └─ ... ├─ utils utils fn │ ├─ filters.js │ ├─ bus.js │ └─ ... ├─ mixins │ ├─ index.js │ └─ ... ├─ plugins │ ├─ ChartPlugin.js │ └─ ... ├─ translations 다국어 │ ├─ index.js │ ├─ en.json │ └─ ... ├─ images ├─ fonts └─ assets |