Development commissioning involves the following steps:
Install a dependency
Development commissioning
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
withoutcompress
Automatic change of the
watch
codeHot 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.