UNPKG

@thingjs/cli

Version:

<div align="center">      <a href="https://www.thingjs.com/guide/"><img width="200" src="https://www.thingjs.com/static/images/avatar.png"/></a> </div>

68 lines (44 loc) 1.8 kB
<div align="center">      <a href="https://www.thingjs.com/guide/"><img width="200" src="https://www.thingjs.com/static/images/avatar.png"/></a> </div> <div align="center"> <img src="https://img.shields.io/badge/node-^14.18.0^16.0.0-brightgreen.svg" alt="node"/>     <img src="https://img.shields.io/badge/ThingJS-v2.0-brightgreen.svg" alt="ThingJS"/> </div> # @thingjs/cli `@thingjs/cli` is used to create thing.js project and resource templates quickly. The CLI(`@thingjs/cli`) is a globlly installed npm package and provides the `thing` command in your terminal. It provides the ability to scaffold a new project via `thing create`. ## 📦 Install <!-- 1. 使用 npm 全局安装 `@thingjs/cli`。 --> 1. Global installation of `@thingjs/cli` ```bash npm install @thingjs/cli -g ``` <!-- 2. 测试是否安装成功。 --> 2. You can verify that it is properly installed by running this command: ```bash thing -h ``` And it will show a number of options which means the installation is successful. <!-- 如果能正确打印出帮助信息,即表示安装成功! --> ## 📔 Getting Started <!-- 在命令行输入 `thing create`,然后选择需要的开发模板,回车后,即可创建成功。 --> To create a new project based on thing.js, run `thing create` in a terminal and you will be prompted to name the project. Then You can choose different type of templates to create correspond thing.js project. ```bash $ thing create ? Please enter a project name: test-plugin ? Please pick a preset: Plugin ✔ Download Successful! ``` You can list the thing.js versions by: ```bash thing list ``` Also pick the thing.js version by: ```bash thing install ``` You can also choose a version you know, such as v2.0.2 ```bash thing install 2.0.2 ```