Quick Start
Quickly build the lwa program of CUTOS, let's get started!
Environment Preparation
1. Install node.js
- Download link node.js, it is recommended that you use version >=16.0.
2. Install CUTOS
- Download CUTOS (development version)
- Install CUTOS
- Authorization Contact the software vendor for authorization
3. 2 development environments
- LWA and CUTOS on the same machine
- LWA and CUTOS on different machines
Download project template
Name | Description | Download template |
---|---|---|
lwa-template | LWA example | Download |
Project Structure
├── lwa-template/ # LWA example
│ ├── public/ # Static resource directory
│ ├── config.json # Configuration file, configure related parameters
│ ├── index.html # Home page content
│ ├── thumbnail.png # Upload thumbnail
│ ├── src/ # Source code directory
│ ├── js/ # js file directory
│ ├── config.js # Some operations to get parameters from config configuration file
│ ├── main.js # Entry file
│ ├── gulpfile.js # Gulp packaging configuration
│ ├── package.json # Project configuration information
│ ├── readme.md # Instructions
│ ├── webpack.config.js # Webpack packaging configuration
Install project dependencies
npm install
Run
npm run dev
Compile and package
npm run build
The packaged lwa file is in the dist
path
├── lwa-template/ # LWA example
│ ├── dist/ # Package file directory
│ ├── lwa-template-v1.0.0.lwa # File package
The other files packaged are in the target
path
├── lwa-template/ # LWA example
│ ├── target/ # Package file directory
│ ├── js # js file directory
│ ├── main.js # Packaged js code
│ ├── config.json # Configuration file, configure related parameters
│ ├── index.html # Home page content
│ ├── thumbnail.png # Upload thumbnail
Upload and publish
For details, see 6.2 Upload and publish