官术网_书友最值得收藏!

Technical requirements

In this chapter, we will be using Node.js and Vue-CLI.

Attention Windows users! You need to install an NPM package called windows-build-tools to be able to install the following requisite packages. To do this, open Power Shell as an administrator and execute the following command:
> npm install -g windows-build-tools

To install Vue-CLI, you need to open Terminal (macOS or Linux) or Command Prompt/PowerShell (Windows) and execute the following command:

> npm install -g @vue/cli @vue/cli-service-global

Creating the base file

In all recipes in this chapter, we will use this base template which we will create now. Make sure you follow these steps to create the file before starting the example in the recipe:

  1. Create a new .html file in any folder and open it.
  2. Create an html tag and add a head HTML element as a child. Inside the head HTML element, add a script HTML element with the src attribute defined as http://unpkg.com/vue@next:
<html>
<head>
<script src="https://unpkg.com/vue@next"></script>
</head>
</html>
  1. As a sibling of the  head HTML element, create a body HTML element. Inside the body HTML element, add a div HTML element with the attribute id defined as "app":
<body>
<div id="app">
</div>
</body>
  1. Finally, as a sibling of the div HTML element, create a script HTML element, with empty content. This will be where we will place the code for the recipes:
<script></script>
主站蜘蛛池模板: 绥化市| 四子王旗| 巧家县| 天津市| 山东省| 双牌县| 大余县| 安平县| 青神县| 汤原县| 尉氏县| 木兰县| 文昌市| 二连浩特市| 和田市| 南部县| 舞钢市| 鹤庆县| 福建省| 葵青区| 台前县| 潼南县| 逊克县| 大英县| 弥渡县| 贵德县| 民和| 桂林市| 安西县| 永善县| 浮梁县| 长海县| 高安市| 孝昌县| 金川县| 梧州市| 修武县| 长泰县| 绥阳县| 浏阳市| 嘉黎县|