Vue CLI

Aus Wikizone
Wechseln zu: Navigation, Suche

Installation

via node.js / npm

sudo npm install -g @vue/cli

Basics

vue create

vue create my-vue-project

Erstellt ein vue Projekt mit einigen Zusatztools. Der Assistent ermöglicht die Auswahl von verschiedenen Optionen z.B.

Vue CLI v4.5.9
? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel, Linter
? Choose a version of Vue.js that you want to start the project with 3.x (Preview)
? Pick a linter / formatter config: Basic
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No

Wenn das Projekt erstellt ist gibt Dir Vue auch den Code aus mit dem du starten kannst:

 $ cd my-first-vue-cli
 $ npm run serve