All Products
Search
Document Center

Develop and debug

Last Updated: May 25, 2021

Development commissioning involves the following steps:

  1. Install a dependency
  2. Develop and debug
  3. Build

Click Demo to get a code example and complete the following operations.

Install a dependency

Enter the root directory of the project and use cnpm to install the npm dependency.

 
  1. # Install the npm dependency.
  2. cnpm install

Develop and debug

After installing a workspace, start the development mode with the following command:

 
  1. cnpm run dev

The preceding command performs the following operations:

  • Run kylin build --dev to start the building in dev mode:
    • Not use compress to compress css/js
    • watch code changes automatically
    • Hot update code
  • Start a server at http://localhost:8090/.

Build

Use the following command to enable the build mode.

 
  1. cnpm run build

The preceding command performs the following steps:

  • Run the kylin build command to compile the source code of the project.
  • Export the compilation output to the ./www/ directory for subsequent packaging.