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

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>
主站蜘蛛池模板: 长岭县| 肥乡县| 余干县| 克拉玛依市| 茶陵县| 营口市| 乌兰察布市| 澎湖县| 香格里拉县| 泽普县| 抚松县| 南木林县| 太保市| 平昌县| 宝丰县| 集贤县| 奎屯市| 邵阳县| 宁夏| 会宁县| 筠连县| 冷水江市| 密山市| 岳西县| 民勤县| 贵州省| 肥乡县| 张北县| 肥东县| 内江市| 彝良县| 仲巴县| 中宁县| 朔州市| 穆棱市| 辛集市| 闽侯县| 辰溪县| 大荔县| 潜江市| 铁岭市|