I have a project on Vue.js using Webpack. And I want to add vue-cli features to it so I can work with it like I do with vue-cli generate project. But I don't know how to integrate vue-cli with existing project.
With new project I can do vue create <project-name
but I couldn't find the instruction on integrating it with existing projects. Is there an official way to do so? (I suppose I can just create the new project and move all of the sources there, but still probably there's a better way to do it)
You can verify that it is properly installed by simply running vue , which should present you with a help message listing all available commands.
@OrestesKappa Just install vue at the version you want or just use npm install vue@latest --save to get the latest (note that updating from 2 to 3 requires quite some changes and many extensions haven't been updated yet).
There are two ways that you can run and use Vue CLI 3.0: through a global installation or through npx. You will learn about both here. If you have previously installed vue - cli, v1. x or v2. x, you need to uninstall it first by running the following command: The Vue CLI package has been renamed for v3. x to @vue / cli.
The GUI will open in your browser. The Projects tab shows the existing Vue projects. The Create tab is the one we need. Clicking it, select the folder you want to create your project in and click to start creating a new project at that location. Give a name to the project folder, select the options you want and move on to the next step.
The Vue CLI has evolved into a full system for rapid VueJS development. Vue CLI 3.0 comes packed with extraordinary tooling that increases developer experience by providing fast and intuitive project scaffolding, webpack sensible defaults, zero configuration, extensibility, and much more.
The Vue CLI is under active development and using it through npx is good for an one-off trial, but if you are a Vue developer dedicated to managing and creating many Vue projects with lots of dependencies, a global installation for local usage is a better approach to avoid bug or conflicts that may be introduced in future releases.
Inside the Project Folder in the terminal enter vue create .
I did it the "painful" way - by creating a new project and comparing to my existing one. I say painful because I was using Bootstrap directly in index page, also PWA settings. Parcel was used as a packager and my folders were all in the root (assets, components, etc.).
However, it was not that bad. The things I did to make the transition easier:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With