Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Vue.js 2 Web Development Projects

You're reading from   Vue.js 2 Web Development Projects Learn Vue.js by building 6 web apps

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781787127463
Length 398 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
CHAU GUILLAUME CHAU GUILLAUME
Author Profile Icon CHAU GUILLAUME
CHAU GUILLAUME
Arrow right icon
View More author details
Toc

General app structure


In this first part, we are going to create the project structure and learn more about routing and pages.

Setting up the project

For setting up the project, the following steps need to be followed:

  1. First, generate a Vue project with the vue init webpack-simple <folder> command, like we did in Chapter 4, Advanced Project Setup:
      vue init webpack-simple support-center
      cd support-center
      npm install
      npm install --save babel-polyfill
  1. Install the packages necessary to compile Stylus code (our style will be written using Stylus):
  • stylus
  • stylus-loader
      npm install --save-dev stylus stylus-loader

Note

Don't forget to save the development tools packages in the development dependencies of your package.json file with the --save-dev flag.

  1. Remove the content of the src folder where we will put all the sources of our app.
  2. Then create a main.js file with the code needed to create a Vue app:
      import 'babel-polyfill'
      import Vue from 'vue'

      new Vue...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime