Skip to content

marcelruiter/vue_intro

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Build a basic Vue project without using Webpack. Here's a tutorial on developerlife.com that provides a detailed explanation of the code in this repo.

Single origin policy

To enhance security, ES6 modules are subject to same-origin policy which means we have to run a local server in order to being able to run JavaScript applications using this technology. Unfortunately, that means we have to install a npm dependency browsersync. There's more info on stackoverflow on this CORS (cross origin resource sharing) policy.

Structure of the project

This is the folder and file structure of the project.

+-- package.json
+-- src
    +-- TodoComponents.js
    +-- index.html
    +-- main.js
    +-- styles.css

And here's the package.json script that's needed to launch the local web server that will serve up all the JS files from the same origin.

{
  "scripts": {
    "start": "browser-sync start --server 'src' --files 'src' --single"
  }
}

Run it

Type the following commands:

  • npm install
  • npm start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 58.0%
  • JavaScript 33.0%
  • CSS 8.4%
  • Shell 0.6%