All Products
Search
Document Center

Mobile Platform as a Service:Develop and Debug

Last Updated:Aug 17, 2022

Development commissioning involves the following steps:

  1. Install a dependency

  2. Development commissioning

  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.

# Install the npm dependency.
cnpm install

Development commissioning

After installing a workspace, enable the development mode with a command such as the following command:

cnpm run dev

The preceding command performs the following steps:

  • Run kylin build --dev to start the following in dev mode:

    • Compression of css/js without compress

    • Automatic change of the watch code

    • Hot code updates

  • Start a server at http://localhost:8090/.

Build

Use the following command to enable the build mode.

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.