48

Vue CLI 3.0 is here: Less configuring, more coding

 5 years ago
source link: https://www.tuicool.com/articles/hit/M7zaean
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Exciting news for Vue CLI! The 3.0 release is here!

Last Friday, the team behind Vue CLI, the standard build toolchain for Vue applications, announced the latest release that is packed with amazing new features!

According to the announcement , this release is going to be “a completely different beast from its previous version!” The same source mentions that there are two main drivers behind the decision to rewrite it:

  • To reduce configuration fatigue of modern frontend tooling, especially when mixing multiple tools together
  • To incorporate best practices in the toolchain as much as possible so it becomes the default for any Vue app

Let’s have a closer look at the main features of the 3.0 release.

As less configuration as possible

Vue CLI 3.0 aims to save you from unnecessary plumbing by making sure that all its features work nicely together. More precisely, the list of what the latest release offers includes:

Rich built-in features –Out-of-the-box support for Babel, TypeScript, ESLint, PostCSS, PWA, Unit Testing & End-to-end Testing.

Extensibility –The plugin system allows the community to build and share reusable solutions to common needs.

Configurability with no need to eject –When you scaffold a project via Vue CLI 3, it installs the Vue CLI runtime service (@vue/cli-service), selected feature plugins, and generates the necessary config files for you. In most cases, you just need to focus on writing the code.

SEE ALSO: Vue.js vs React poll results: Vue.js ready to slay its competition

Graphical User Interface –Create, develop and manage your projects through an accompanying graphical user interface.

Instant prototyping –It isn’t fun to wait for  npm install before you can write any code. With Vue CLI 3’s  vue serve command, this is all you need to do to start prototyping with Vue single-file components.

Versatility and future-ready –You can effortlessly ship native ES2015 code for modern browsers, or build your Vue components as native web components.

Check out the Vue CLI 3 documentation for further details on the new features.

Getting started

You can install the new package using one of those commands:

npm install -g @vue/cli
# OR
yarn global add @vue/cli

You can create a new project using:

vue create my-project
# OR
vue ui

Keep in mind that Vue CLI requires Node.js version 8.9 or above (8.11.0+ recommended). You can also manage multiple versions of Node on the same machine with  nvm or  nvm-windows .


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK