Command Line Tools

The Ray framework provides supporting solutions. Due to some objective reasons for the multi-terminal build, the kit must be installed in the project when you design the build process.

The project must include at least the following dependencies:

{
  "dependencies": {
    "@ray-js/ray": "latest"
  },
  "devDependencies": {
    "@ray-js/cli": "latest"
  }
}

Make sure the installed versions are consistent. Note that other configurations that lock versions, such as yarn.lock, affect the framework performance.

Note: If you are unsure, you can delete node_modules and yarn.lock and reinstall dependencies.

Invoke in the command line interface

After the installation in the project is completed, you can make a request in the terminal through npx.

# Invoke in the terminal
npx ray start -t tuya

You can also use the commands in scripts of the package.json file.

{
  "scripts": {
    "start:web": "ray start -t web",
    "start:wechat": "ray start -t wechat",
    "build:web": "ray build -t web",
    "build:wechat": "ray build -t wechat"
  }
}

Things to note

  • Make sure the version of @ray-js/* dependencies is up-to-date. Otherwise, bugs might occur.
  • You can update the framework by using the command yarn upgrade --scope @ray-js --caret.