New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aiot-toolkit

Package Overview
Dependencies
Maintainers
5
Versions
390
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aiot-toolkit

Tools for creating, developing, and packaging aiot applications.

2.0.4
latest
npm
Version published
Maintainers
5
Created
Source

项目介绍

aiot-toolkit 2.0 是将 源码项目 转换为 目标代码项目 并生成 目标代码应用 的命令行工具,同时配备了 模拟器 相关功能供开发者使用。

aiot-toolkit2.0目前支持的打包格式如下:

  • ux:vela 平台下的应用,目前大量使用于小米手表、音箱等智能穿戴及物联网设备

安装使用

  • 全局安装

    npm i aiot-toolkit -g

    npm i create-aiot -g

  • 创建项目

    • create-aiot ux
    • 在项目根目录执行:npm i
  • 本机运行项目

    在项目根目录执行 aiot start,此会启动模拟器,并运行项目

  • 打包项目

    在项目根目录执行 aiot release

常用命令

命令说明
npm create aiot创建并手动选择项目
npm create aiot ux创建ux项目
aiot build构建项目
aiot release构建项目-release模式
aiot start构建项目并运行到模拟器
aiot getConnectedDevices获取已连接设备列表
aiot getPlatforms获取设置平台
aiot installDbgAndMkp在真机上安装快应用调试器
aiot createVVD创建 vela 模拟器
aiot deleteVVD删除 vela 模拟器
aiot resignbuild目录重新生成rpk, 详情: resign

build 参数

参数类型描述默认值参考
devtoolstringsource map 配置https://www.webpackjs.com/configuration/devtool/#devtool
enable-jscconfirm是否启用 jsc bundlefalse
enable-protobufconfirm是否启用 protobuffalse
enable-e2econfirm是否为当前项目注入测试套件falsehttps://doc.quickapp.cn/tutorial/others/testing.html
enable-statsconfirm分析 webpack 输出文件的大小false
optimize-css-attrconfirm优化压缩css名称false
complete-featureconfirm自动将代码中使用的功能,补全到 manifest.json 的 features 字段中false
start-pagestring启动页面,示例:--start-page 'pages/index?a=1&b=2'
enable-custom-componentconfirm已废弃
statsconfirm已废弃

resign

build目录重新生成rpk

步骤

  • 创建任意名称的空目录, 例如 folder
  • build 复制到 folder
  • (可跳过)如需自定义证书,将证书复制到 folder/sign
  • 进入 folder 目录,执行 aiot resign,会在foler/dist中生成rpk
  • 目录结构如下
folder
  build // 用户复制
  sign  // 用户复制,可选
     certificate.pem
     private.pem
  dist  // 生成
     ***.rpk

Keywords

aiot

FAQs

Package last updated on 03 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts