start

Start the build and preview service and listen for changes in project files in real time.

Tuya MiniApp IDE automates start

The Tuya MiniApp IDE can be configured to automatically execute start when starting a project, eliminating the need to manually execute 'ray start' in the console. Configure devMode: ray in project.tuya.json to associate ray start when starting a project.

{
  "devMode": "ray"
}

Command description

ray start ./my-app

Note: my-app indicates the directory where the project is located.

Usage: ray-start [options] [cwd]

Start just-in-time compilation and preview.


Options:
  --source <folder>        The directory of source code. Default value: src.
  --output <folder>        The output directory.
  --mini                   Enable the compression of the output files. Default value: true.
  --no-mini                Disable the compression of the output files.
  -t --target <target>     The target platform.
  -a --analyze             Enable analyze. Default value: false.
  --type <type>            The build type. Valid values: app and component. Default value: app.
  --transform-mode <mode>  The conversion type of a component. Valid values: auto and pure. Default value: auto.
  -h, --help               Display help for this command.

Options

source

The source code directory of the project. Default value: src.

output

The output directory.

mini

After mini is enabled, the generated files are compressed to a certain extent, and a certain amount of compilation time is consumed. Due to limitations by the Tuya MiniApp IDE, the files can meet the upload requirements after compression is enabled. By default, mini is enabled in build mode.

Important: Compression in dev mode is not equivalent to that in build mode, and the actual application size depends on the build result.

no-mini

Disable the compression of the output files.

target

The target platform. Valid values: web, wechat, tuya, ios, and android.

analyze

Enable the visualized analytics method analyze. For more information, see Webpack Bundle Analyzer.

type

The build type. Valid values: app and component.

transform-mode

The conversion type of a component. It is valid only when the type is component. Valid values: auto and pure.