Book Image

The Majesty Of Vue.js

By : Alex Kyriakidis, Kostas Maniatis
Book Image

The Majesty Of Vue.js

By: Alex Kyriakidis, Kostas Maniatis

Overview of this book

<p>Vue.js is a library to build interactive web interfaces. The aim is to provide the benefits of reactive data binding and composable view components with an API that is as simple as possible.</p> <p>This book will teach you how to efficiently implement Vue.js in your projects. It starts with the fundamentals of Vue.js to building large-scale applications. You will find out what components, filters, methods, and computed properties are and how to use them to build robust applications.</p> <p>Further on, you will become familiar with ES6, single file components, module bundlers, and workflow automation. The best way to learn to code is to write it, so there’s an exercise at the end of most of the chapters for you to solve and actually test yourself on what you have learned. You can solve these in order to gain a better understanding of Vue.js.</p> <p>By the end of this book, you will be able to create fast front-end applications and increase the performance of your existing projects with Vue.js integration.</p>
Table of Contents (23 chapters)
The Majesty of Vue.js
Credits
About the Authors
www.PacktPub.com
Preface
2
Getting Started
8
Consuming an API – Preface
12
ECMAScript 6
15
Swapping Components
18
Closing Thoughts

vue-cli


To avoid configuring Webpack and creating a new workflow from nothing, we will use vue-cli.

Note

vue-cli (https://github.com/vuejs/vue-cli) is a simple CLI for scaffolding Vue.js projects. It is a really handy tool, created by Evan You.

This awesome tool is the fastest way to get up a pre-configured build. It offers templates with hot-reload, lint-on-save, unit testing, and much more. Currently, it offers scaffold templates for Webpack and Browserify, but if needed, you can create you own by visiting https://goo.gl/js4fdN.

Vue's templates

What CLI does, is pulling down templates from Vue.js official templates repository (https://github.com/vuejs-templates) where there are 5 templates available now. I believe this number will grow in the near future. You can check what they include on GitHub.

All templates contain a package.json file, which handles the project's dependencies and comes with a preset of NPM scripts.

Using Vue's project templates, you get a lot of features together. For example...