2017-12-28 22:13:11 -05:00
2017-12-28 22:13:11 -05:00
2017-12-27 15:28:36 -05:00
2017-12-28 17:51:32 -05:00
2017-12-28 00:47:32 -05:00
2017-12-27 15:28:36 -05:00
2017-12-24 15:43:26 -05:00
2017-12-28 17:51:32 -05:00
2017-12-27 15:28:36 -05:00
2017-12-28 22:10:32 -05:00

vue-cli

WIP: this is the work in progress branch of the upcoming vue-cli 3.0. Only for preview for template maintainers.

Development Setup

This project uses a monorepo setup that requires using Yarn because it relies on Yarn workspaces.

# install dependencies
yarn

# link `vue` executable
cd packages/@vue/cli
yarn link

# create test projects in /packages/test
cd -
cd packages/test
vue create test-app
cd test-app
yarn
yarn dev

Core Concepts

There are two major parts of the system:

  • @vue/cli: globally installed, exposes the vue create <app> command;
  • @vue/cli-service: locally installed, exposes the vue-cli-service commands.

Both utilize a plugin-based architecture.

Creator

Creator is the class created when invoking vue create <app>. Responsible for prompting for preferences, generating the project files and installing dependencies.

Generator

Generators are globally-installed plugins for the Creator. @vue/cli ships with a number of built-in generators.

A generator should export a function which receives a GeneratorAPI instance as the only argument. The API allows a generator to inject prompts, package.json fields and files to the project being created.

Service

Service is the class created when invoking vue-cli-service <command> [...args]. Responsible for managing the internal webpack configuration, and exposes commands for serving and building the project.

Plugin

Plugins are locally installed into the project as devDependencies. @vue/cli-service ships with a number of built-in plugins.

A plugin should export a function which receives two arguments:

  • A PluginAPI instance
  • Project local options specified in vue.config.js

The API allows plugins to extend/modify the internal webpack config for different environments and inject additional commands to vue-cli-service.

Description
🛠️ webpack-based tooling for Vue.js Development
Readme MIT 45 MiB
Languages
JavaScript 75%
Vue 22.9%
TypeScript 0.9%
Stylus 0.5%
HTML 0.3%
Other 0.4%