Creating Vue Project (CLI)
By Katharina · · 1 min read
<!-- First install Node.js and nvm (if not installed) -->
npm install -g @vue/cli
vue create project-name
<!-- Choose options -->
Please pick a preset: Manually select features
? Check the features needed for your project: Babel, Router, Vuex, Linter
? Use history mode for router? (Requires proper server setup for index fallback in production) Yes
? Pick a linter / formatter config: Prettier
? 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
npm run serve
By the way, there are several ways to to implement Vue.js in your project:
Install using npm (Install Package Manager) ($ npm install vue);
Include the script tag into html file(version for learning & developing:
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>, version for production:<script src="https://cdn.jsdelivr.net/npm/vue@2.6.11"></script>, and for native ES Modules:<script type="module"> import Vue from 'https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.esm.browser.js' </script>);Vue CLI method (Command Line Interface);
Install using the brower client side package manager.