Convert Figma logo to code with AI

vuejs logovue-cli

šŸ› ļø webpack-based tooling for Vue.js Development

29,757
6,325
29,757
1,069

Top Related Projects

Set up a modern web app by running one command.

CLI tool for Angular

78,194

Cybernetically enhanced web apps

124,777

The React Framework

67,112

Next generation frontend tooling. It's fast!

54,014

The Intuitive Vue Framework.

Quick Overview

Vue CLI is the official build tooling for Vue.js applications. It provides a full-featured development environment with an intuitive GUI and a powerful command-line interface, allowing developers to quickly set up and manage Vue.js projects with modern web development best practices out of the box.

Pros

  • Easy project setup with a wide range of pre-configured build setups
  • Extensible plugin system for adding new features and customizing the build process
  • Graphical user interface for project management and configuration
  • Built-in support for modern web development features like ES6, TypeScript, and CSS pre-processors

Cons

  • Learning curve for developers new to build tools and modern JavaScript ecosystems
  • Can be overkill for small or simple projects
  • Occasional conflicts with other build tools or legacy systems
  • Updates may introduce breaking changes, requiring project maintenance

Code Examples

  1. Creating a new Vue.js project:
vue create my-project
  1. Adding a plugin to an existing project:
vue add vuetify
  1. Running the development server:
vue serve
  1. Building for production:
vue build

Getting Started

To get started with Vue CLI, follow these steps:

  1. Install Node.js (version 10.x or higher)
  2. Install Vue CLI globally:
npm install -g @vue/cli
# OR
yarn global add @vue/cli
  1. Create a new project:
vue create my-project
cd my-project
  1. Start the development server:
npm run serve
# OR
yarn serve

Your Vue.js application will now be running at http://localhost:8080/.

Competitor Comparisons

Set up a modern web app by running one command.

Pros of Create React App

  • Simpler configuration and setup process
  • Larger ecosystem and community support
  • More comprehensive documentation and tutorials

Cons of Create React App

  • Less flexibility for custom configurations
  • Heavier bundle size due to included dependencies
  • Steeper learning curve for beginners

Code Comparison

Create React App:

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

ReactDOM.render(<App />, document.getElementById('root'));

Vue CLI:

import Vue from 'vue';
import App from './App.vue';

new Vue({
  render: h => h(App),
}).$mount('#app');

Both tools provide a streamlined development experience for their respective frameworks. Create React App offers a more opinionated setup with less configuration required, while Vue CLI provides more flexibility and customization options out of the box.

Create React App is ideal for developers who prefer a standardized approach and want to quickly start building React applications without worrying about configuration. Vue CLI, on the other hand, caters to developers who desire more control over their project structure and build process.

Ultimately, the choice between these tools depends on the specific needs of your project and your familiarity with the underlying frameworks.

CLI tool for Angular

Pros of Angular CLI

  • More comprehensive tooling and scaffolding options
  • Better support for large-scale enterprise applications
  • Stricter TypeScript integration for improved type safety

Cons of Angular CLI

  • Steeper learning curve due to more complex architecture
  • Slower build times for larger projects
  • Less flexibility in project structure compared to Vue CLI

Code Comparison

Angular CLI project generation:

ng new my-angular-project
cd my-angular-project
ng serve

Vue CLI project generation:

vue create my-vue-project
cd my-vue-project
npm run serve

Both CLIs offer similar commands for generating components, but Angular CLI provides more options:

Angular CLI:

ng generate component my-component

Vue CLI:

vue add @vue/cli-plugin-typescript
vue invoke typescript

Angular CLI typically requires more boilerplate code for component creation, while Vue CLI aims for simplicity:

Angular component:

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  template: '<h1>Hello, Angular!</h1>',
})
export class AppComponent {}

Vue component:

<template>
  <h1>Hello, Vue!</h1>
</template>

<script>
export default {
  name: 'App'
}
</script>
78,194

Cybernetically enhanced web apps

Pros of Svelte

  • Smaller bundle sizes due to compile-time framework
  • Simpler, more intuitive syntax with less boilerplate
  • Better performance with minimal runtime overhead

Cons of Svelte

  • Smaller ecosystem and community compared to Vue
  • Fewer third-party libraries and components available
  • Less mature tooling and IDE support

Code Comparison

Svelte component:

<script>
  let count = 0;
  function increment() {
    count += 1;
  }
</script>

<button on:click={increment}>
  Clicks: {count}
</button>

Vue component (using Vue CLI):

<template>
  <button @click="increment">
    Clicks: {{ count }}
  </button>
</template>

<script>
export default {
  data() {
    return { count: 0 }
  },
  methods: {
    increment() {
      this.count++
    }
  }
}
</script>

Svelte's syntax is more concise and closer to vanilla JavaScript, while Vue CLI requires more setup and uses a specific component structure. Svelte compiles away most of its framework code, resulting in smaller bundle sizes, whereas Vue CLI relies on a runtime library. However, Vue CLI benefits from a larger ecosystem and more established tooling, making it easier to find resources and integrate with existing projects.

124,777

The React Framework

Pros of Next.js

  • Built-in server-side rendering (SSR) and static site generation (SSG)
  • Automatic code splitting for faster page loads
  • Seamless integration with Vercel for easy deployment

Cons of Next.js

  • Steeper learning curve for developers new to React
  • Less flexibility in project structure compared to Vue CLI
  • Limited built-in state management solutions

Code Comparison

Next.js (pages/index.js):

import Head from 'next/head'

export default function Home() {
  return (
    <div>
      <Head>
        <title>My Next.js App</title>
      </Head>
      <h1>Welcome to Next.js!</h1>
    </div>
  )
}

Vue CLI (App.vue):

<template>
  <div id="app">
    <h1>Welcome to Vue.js!</h1>
  </div>
</template>

<script>
export default {
  name: 'App'
}
</script>

Both frameworks offer powerful tools for building modern web applications, but they cater to different needs. Next.js excels in server-side rendering and static site generation, making it ideal for content-heavy websites and applications requiring SEO optimization. Vue CLI, on the other hand, provides a more flexible and lightweight approach, allowing developers to gradually adopt features as needed. The choice between the two depends on project requirements, team expertise, and scalability needs.

67,112

Next generation frontend tooling. It's fast!

Pros of Vite

  • Significantly faster build and development times due to native ES modules
  • Leaner and more modern architecture, resulting in simpler configuration
  • Out-of-the-box support for TypeScript, JSX, and CSS pre-processors

Cons of Vite

  • Less mature ecosystem and plugin availability compared to Vue CLI
  • May require additional setup for certain legacy browsers or dependencies
  • Learning curve for developers accustomed to traditional bundler-based setups

Code Comparison

Vue CLI (vue.config.js):

module.exports = {
  configureWebpack: {
    plugins: [
      new MyWebpackPlugin()
    ]
  }
}

Vite (vite.config.js):

import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [myVitePlugin()]
})

The code comparison shows the difference in configuration approach between Vue CLI (using webpack) and Vite. Vite's configuration is generally more straightforward and requires less boilerplate.

While Vue CLI has been the go-to tool for Vue.js projects, Vite offers a more modern and efficient development experience. However, Vue CLI still maintains an advantage in terms of ecosystem maturity and compatibility with older projects or dependencies.

54,014

The Intuitive Vue Framework.

Pros of Nuxt

  • Built-in server-side rendering (SSR) capabilities
  • Automatic code splitting and optimized performance
  • Simplified routing with file-based structure

Cons of Nuxt

  • Steeper learning curve for developers new to SSR concepts
  • Less flexibility in project structure compared to Vue CLI

Code Comparison

Vue CLI project structure:

my-project/
ā”œā”€ā”€ public/
ā”œā”€ā”€ src/
ā”‚   ā”œā”€ā”€ assets/
ā”‚   ā”œā”€ā”€ components/
ā”‚   ā”œā”€ā”€ views/
ā”‚   ā”œā”€ā”€ App.vue
ā”‚   ā””ā”€ā”€ main.js
ā””ā”€ā”€ package.json

Nuxt project structure:

my-project/
ā”œā”€ā”€ pages/
ā”œā”€ā”€ components/
ā”œā”€ā”€ layouts/
ā”œā”€ā”€ store/
ā”œā”€ā”€ assets/
ā”œā”€ā”€ static/
ā””ā”€ā”€ nuxt.config.js

Vue CLI focuses on providing a flexible scaffolding tool for Vue.js projects, allowing developers to customize their setup. It's ideal for single-page applications (SPAs) and offers a plugin system for extending functionality.

Nuxt, on the other hand, is a higher-level framework built on top of Vue.js. It provides a more opinionated structure and includes features like SSR, static site generation, and automatic routing out of the box. This makes it particularly well-suited for building server-rendered applications and static websites.

While Vue CLI offers more flexibility, Nuxt simplifies the development process for complex applications, especially those requiring SSR or static site generation. The choice between the two depends on project requirements and developer preferences.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Vue CLI Build Status Windows Build status lerna

Ć¢ĀšĀ ĆÆĀøĀ Status

Vue CLI is now in maintenance mode. For new projects, please use create-vue to scaffold Vite-based projects. create-vue supports both Vue 2 and Vue 3.

Also refer to the Vue 3 Tooling Guide for the latest recommendations.

For information on migrating from Vue CLI to Vite:

Documentation

Docs are available at https://cli.vuejs.org/ - we are still working on refining it and contributions are welcome!

Contributing

Please see contributing guide.

License

MIT

NPM DownloadsLast 30 Days