Vue Setup
Create a workspace and initial application
You develop apps in the context of an Vue3 workspace.
To create a new workspace and initial starter app:
- Run the command Vue new and provide the name filename as my-app, as
shown below
npm init vue@latest
// This command will install and execute create-vue, the official Vue project scaffolding tool. You
will be presented with prompts for several optional features such as TypeScript and testing
support:
✔ Project name: … <your-project-name>
✔ Add TypeScript? … No / Yes
✔ Add JSX Support? … No / Yes
✔ Add Vue Router for Single Page Application development? … No / Yes
✔ Add Pinia for state management? … No / Yes
✔ Add Vitest for Unit testing? … No / Yes
✔ Add Cypress for both Unit and End-to-End testing? … No / Yes
✔ Add ESLint for code quality? … No / Yes
✔ Add Prettier for code formatting? … No / Yes
Scaffolding project in
<your-project-name>...
Done.
-
If you are unsure about an option, simply choose No by hitting enter for now. Once the project is
created, follow the instructions to install dependencies and start the dev server:
Run the application
The Vue3 includes a server, so that you can build and serve your app
locally.
- Navigate to the workspace folder
- Run the following commands:
> cd <your-project-name >
> npm install
> npm run dev
You should now have your first Vue project running!