- Vue.js 3 Cookbook
- Heitor Ramon Ribeiro
- 249字
- 2021-06-11 18:11:53
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
> 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:
- Create a new .html file in any folder and open it.
- 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>
- 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>
- 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>
推薦閱讀
- 零點起飛學Xilinx FPG
- Python GUI Programming:A Complete Reference Guide
- BeagleBone By Example
- 深入淺出SSD:固態存儲核心技術、原理與實戰
- Practical Machine Learning with R
- STM32嵌入式技術應用開發全案例實踐
- 筆記本電腦使用、維護與故障排除從入門到精通(第5版)
- 面向對象分析與設計(第3版)(修訂版)
- 筆記本電腦應用技巧
- Spring Cloud微服務和分布式系統實踐
- FL Studio Cookbook
- 筆記本電腦芯片級維修從入門到精通(圖解版)
- 單片機項目設計教程
- USB應用分析精粹:從設備硬件、固件到主機端程序設計
- 詳解FPGA:人工智能時代的驅動引擎