First, build the environment
1.1 Installing Node.js.
Quick applications need to use version 6.0 or later, but cannot use version 8.0.*. If you already have version 8.0 installed on your local computer and do not want to uninstall it, you can install NVM on your local computer.
Install the NVM
1.1.1 download NVM
Download address https://github.com/coreybutler/nvm-windows/releases
1.1.2 installation
After decompressing, double-click install to go to the next step.
1.1.3 Verifying the Installation
On the CLI, run the NVM command. If the version number is displayed, the installation is successful
1.1.4 Viewing the Current Installation Version
Run the NVM ls command to list all versions of Node installed on your computer. The current node version will have an asterisk (*)
1.1.5 Installing a Node Using NVM
Run NVM install v6.11.3 to install node 6.11.3. The v can be omitted
1.1.6 Changing the Node Version
Run the NVM use v6.11.3 command to switch to the specified version. The switchover is global
1.2 installation hap – toolkit
Through the NPM repository installation, execute the following command from the command line:
npm install -g hap-toolkit
If you run hap -v on the CLI, the version information is displayed, indicating that the haP-Toolkit is successfully installed
hap -V
1.3 create HelloWord
This website is very detailed step, directly refer to the website https://doc.quickapp.cn/tutorial/getting-started/hello-world.html
1.4 To test the new page, perform the following steps
1.4.1 Adding a Page folder
Create a page folder in the SRC directory and add the index.ux file to the folder
1.4.2 Modifying the manifest.json file
1. Add configuration 2 of the new page in display.pages in SRC /manifest.json. Add router. Pages in SRC /manifest.json to route configuration for the new page
1.4.3 Running NPM run build
In build file, generate the newly created page folder under build file, and generate the RPK file under dist
Note: This article is built using Windows environment