Book Image

Vue.js 2 Web Development Projects

By : CHAU GUILLAUME
Book Image

Vue.js 2 Web Development Projects

By: CHAU GUILLAUME

Overview of this book

Do you want to make your web application amazingly responsive? Are you unhappy with your app's performance and looking forward to trying out ways to make your app more powerful? Then Vue.js, a framework for building user interfaces, is a great choice, and this book is the ideal way to put it through its paces. This book's project-based approach will get you to build six stunning applications from scratch and gain valuable insights in Vue.js 2.5. You'll start by learning the basics of Vue.js and create your first web app using directives along with rich and attractive user experiences. You will learn about animations and interactivity by creating a browser-based game. Using the available tools and preprocessor, you will learn how to create multi-page apps with plugins. You will create highly efficient and performant functional components for your app. Next, you will create your own online store and optimize it. Finally, you will integrate Vue.js with the real-time Meteor library and create a dashboard showing real-time data. By the end of this book you will have enough skills and will have worked through enough examples of real Vue.js projects to create interactive professional web applications with Vue.js 2.5.
Table of Contents (15 chapters)

Google Auth and state management


In this first section, we will create our first Vuex store to help us manage the state of our application. We will use it to store the current user logging in through the Google OAuth API, which allows them to use their Google account to connect to our app.

Project setup

First, let's set up the basic structure of our new project. We will continue using the router and a few parts of Chapter 5, Project 3 - Support Center.

Creating the app

In this section, we will setup the base app structure for our Geolocated Blog.

  1. Like we did in Chapter 5, Project 3 - Support Center, we will initialize a Vue project with vue-init and install the babel, routing, and stylus packages:
      vue init webpack-simple geoblog</strong>
      cd geoblog
      npm install
      npm install --save vue-router babel-polyfill
      npm install --save-dev stylus stylus-loader babel-preset-vue

Note

Don't forget to add the "vue" preset in the .babelrc file.

  1. Then remove the content of the src...