hap-toolkit
A command line toolkit for developing Quick Apps.
Last updated 10 days ago by zsl369 .
Original npm · Tarball · package.json
$ cnpm install hap-toolkit 
SYNC missed versions from official npm registry.

hap-toolkit

快应用开发者工具

如何使用

  1. 全局安装 hap-toolkit
npm install -g hap-toolkit
  1. 新建示例工程,方便开发者快速上手
hap init `<project-name>`
  1. 安装 npm 依赖
cd `<project-name>`
npm install
  1. 构建项目
npm run build
npm run server
  1. 其他命令(请参考开发者文档

版本日志(详情请查看 CHANGELOG)

[0.7.x]

  • 增加项目重新签名的能力,新增命令行 resign
  • 新增 toolkit 增加在快应用注入输出 log 的能力
  • 支持编译全局公共组件
  • 增加编译动态引入 js 文件的能力,即开发者可以使用 import().then()的方式引入 js 文件

[0.6.x]

  • 调试器 支持chrome[google-chrome]浏览器和chromium[chromium-browser]浏览器
  • 增加了对多语言包打包的能力
  • 兼容 android 10 以上版本的 USB 调试功能
  • 增加 ux 项目提取公共 css 样式的能力
  • 增加快应用项目的 e2e 测试能力
  • 增加测试 ux 项目的代码覆盖率的能力
  • toolkit 配置统一使用 quickapp.config.js,兼容 hap.config.js
  • 支持抽取公共 js 文件的能力,使用方法为编译选项设置--split-chunks-mode <value>;默认不启动,value 为 smart 时启动该能力
  • 增加 lint 能力,开发者可以使用 eslint 模块对项目进行校验和格式化

[0.5.x]

  • 支持 app 全局样式的编译
  • 解决 template 里字符串模板错乱问题

[0.4.x]

  • 添加--disable-stream-pack参数用于禁用流式包(build,release,watch命令有效)
  • 支持自定义配置
  • 修复了 hap update --force 时 JS 报错的问题

[0.3.x]

  • 1040 平台支持
  • 不再支持node 6,要求node 8以上版本
  • 不再创建备份文件
  • 新增web预览功能,打开服务/preview页面可使用浏览器预览快应用
  • 新增hap preview子命令,可直接预览rpk文件或解压的rpk文件目录(包括build目录)
  • 新增hap view子命令,可用于直接查看rpk 文件。详情可执行hap view --help查看
  • 监听模式增加监听manifest.json文件

[0.2.x]

  • 支持分包
  • chrome devtools 升级到 66
  • 修复初始化模块的 elisnt 配置无效的问题
  • 优化错误栈信息
  • 修复toolkit误报使用node原生模块问题

[0.1.x]

  • 项目 package.json 的依赖只有 hap-toolkit,移除了其他依赖
  • 支持 postcss 解析 css
  • 支持可以自定义属性 data-xxx
  • slot 可以作为 text 的子组件
  • WebSocket 支持 ArrayBuffer
  • 更新对部分新属性,新事件,新样式的支持

常见问题

一、从小于 0.0.38 版本升级

若 hap-toolkit 从 0.0.37 升级上来,有比较大的改动,其中需要注意的是:

  1. 项目下面的 .babelrc 文件变更为 babel.config.js 文件。babel.config.js 内容如:
module.exports = function(api) {
  api.cache(true)
  return {
    presets: ['@babel/preset-env'],
    plugins: ['@babel/plugin-transform-modules-commonjs'],
    babelrcRoots: ['.', 'node_modules']
  }
}

.babelrc 文件需要删除。

  1. 项目的基础依赖只需要以下模块,package.json 里的 devDependencies 字段如:
{
  "devDependencies": {
    "babel-eslint": "^10.0.1",
    "eslint": "^5.12.1",
    "eslint-plugin-hybrid": "0.0.5",
    "hap-toolkit": "^0.4.3"
  }
}

修改后请将 node_modules 和 package-lock.json 删除,再重新安装依赖。

反馈问题 查看版本更新历史

Current Tags

  • 1.8.2-beta.1                                ...           beta (2 days ago)
  • 1.8.1                                ...           latest (10 days ago)
  • 0.6.4-simple                                ...           simple (a year ago)

173 Versions

  • 1.8.2-beta.1                                ...           2 days ago
  • 1.8.2-beta.0                                ...           2 days ago
  • 1.8.1                                ...           10 days ago
  • 1.8.1-beta.2                                ...           11 days ago
  • 1.8.1-beta.1                                ...           17 days ago
  • 1.8.1-beta.0                                ...           17 days ago
  • 1.8.0                                ...           a month ago
  • 1.8.0-beta.0                                ...           a month ago
  • 0.7.7-beta.3                                ...           a month ago
  • 0.7.7-beta.2                                ...           a month ago
  • 0.7.7-beta.1                                ...           2 months ago
  • 0.7.7-beta.0                                ...           2 months ago
  • 0.7.6                                ...           2 months ago
  • 0.7.6-beta.1                                ...           2 months ago
  • 0.7.6-beta.0                                ...           2 months ago
  • 0.7.5 [deprecated]           ...           2 months ago
  • 0.7.5-beta.4                                ...           3 months ago
  • 0.7.5-beta.3                                ...           3 months ago
  • 0.7.5-beta.2                                ...           3 months ago
  • 0.7.5-beta.0                                ...           3 months ago
  • 0.7.4                                ...           3 months ago
  • 0.7.4-beta.1                                ...           3 months ago
  • 0.7.4-beta.0                                ...           3 months ago
  • 0.7.3                                ...           4 months ago
  • 0.7.3-beta.1                                ...           4 months ago
  • 0.7.3-beta.0                                ...           4 months ago
  • 0.7.2                                ...           4 months ago
  • 0.7.2-beta.11                                ...           4 months ago
  • 0.7.2-beta.10                                ...           4 months ago
  • 0.7.2-beta.9                                ...           4 months ago
  • 0.7.2-beta.8                                ...           4 months ago
  • 0.7.2-beta.7                                ...           4 months ago
  • 0.7.2-beta.6                                ...           4 months ago
  • 0.7.2-beta.5                                ...           4 months ago
  • 0.7.2-alpha.4                                ...           4 months ago
  • 0.7.2-alpha.3                                ...           4 months ago
  • 0.7.2-alpha.2                                ...           4 months ago
  • 0.7.2-alpha.1                                ...           4 months ago
  • 0.7.2-alpha.0                                ...           4 months ago
  • 0.7.1                                ...           5 months ago
  • 0.7.1-beta.3                                ...           5 months ago
  • 0.7.1-alpha.1                                ...           5 months ago
  • 0.7.1-alpha.0                                ...           5 months ago
  • 0.7.0                                ...           5 months ago
  • 0.7.0-beta.3                                ...           5 months ago
  • 0.7.0-alpha.1                                ...           5 months ago
  • 0.7.0-alpha.0                                ...           6 months ago
  • 0.6.15                                ...           6 months ago
  • 0.6.15-beta.2                                ...           7 months ago
  • 0.6.15-beta.0                                ...           7 months ago
  • 0.6.15-alpha.0                                ...           7 months ago
  • 0.6.14                                ...           8 months ago
  • 0.6.14-beta.2                                ...           8 months ago
  • 0.6.14-beta.1                                ...           8 months ago
  • 0.6.14-beta.0                                ...           8 months ago
  • 0.6.13-beta.3                                ...           8 months ago
  • 0.6.13-beta.2                                ...           8 months ago
  • 0.6.13-game.0                                ...           9 months ago
  • 0.6.13                                ...           9 months ago
  • 0.6.13-beta.1                                ...           9 months ago
  • 0.6.13-beta.0                                ...           9 months ago
  • 0.6.12                                ...           9 months ago
  • 0.6.12-beta.0                                ...           9 months ago
  • 0.6.11                                ...           9 months ago
  • 0.6.11-beta.1                                ...           9 months ago
  • 0.6.11-beta.0                                ...           9 months ago
  • 0.6.10                                ...           10 months ago
  • 0.6.10-beta.1                                ...           10 months ago
  • 0.6.10-beta.0                                ...           10 months ago
  • 0.6.9 [deprecated]           ...           10 months ago
  • 0.6.8 [deprecated]           ...           10 months ago
  • 0.6.7                                ...           a year ago
  • 0.6.6                                ...           a year ago
  • 0.6.5                                ...           a year ago
  • 0.6.4                                ...           a year ago
  • 0.6.4-beta-3                                ...           a year ago
  • 0.6.4-simple                                ...           a year ago
  • 0.6.4-alpha.2                                ...           a year ago
  • 0.6.4-alpha.1                                ...           a year ago
  • 0.6.4-alpha.0                                ...           a year ago
  • 0.6.3                                ...           a year ago
  • 0.6.2                                ...           a year ago
  • 0.6.2-beta.0                                ...           a year ago
  • 0.6.1                                ...           a year ago
  • 0.6.0                                ...           a year ago
  • 0.6.0-beta.0                                ...           a year ago
  • 0.5.6-xiaoai                                ...           a year ago
  • 0.5.6                                ...           a year ago
  • 0.5.6-beta.0                                ...           a year ago
  • 0.5.5                                ...           a year ago
  • 0.5.5-alpha.0                                ...           a year ago
  • 0.5.4                                ...           a year ago
  • 0.5.4-next.1                                ...           a year ago
  • 0.5.4-next                                ...           a year ago
  • 0.5.3                                ...           a year ago
  • 0.5.3-alpha.0                                ...           a year ago
  • 0.5.2                                ...           a year ago
  • 0.5.2-alpha.0                                ...           a year ago
  • 0.5.1                                ...           a year ago
  • 0.5.0                                ...           a year ago
  • 0.4.7                                ...           a year ago
  • 0.4.6                                ...           a year ago
  • 0.4.5                                ...           a year ago
  • 0.4.3                                ...           a year ago
  • 0.4.2                                ...           a year ago
  • 0.4.1                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.4.0-beta.3                                ...           a year ago
  • 0.4.0-beta.2                                ...           a year ago
  • 0.4.0-beta.1                                ...           a year ago
  • 0.4.0-beta.0                                ...           a year ago
  • 0.3.1                                ...           a year ago
  • 0.3.0-beta.2                                ...           2 years ago
  • 0.3.0-beta.1                                ...           2 years ago
  • 0.3.0-beta.0                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.2.0-beta.0                                ...           2 years ago
  • 0.1.2-beta.0                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.1.0-beta.0                                ...           2 years ago
  • 0.0.38 [deprecated]           ...           2 years ago
  • 0.0.38-beta.2 [deprecated]           ...           2 years ago
  • 0.0.38-beta.1 [deprecated]           ...           2 years ago
  • 0.0.38-beta.0 [deprecated]           ...           2 years ago
  • 0.0.37 [deprecated]           ...           2 years ago
  • 0.0.37-beta.3 [deprecated]           ...           2 years ago
  • 0.0.37-beta.2 [deprecated]           ...           2 years ago
  • 0.0.37-beta.1 [deprecated]           ...           2 years ago
  • 0.0.37-beta.0 [deprecated]           ...           2 years ago
  • 0.0.36 [deprecated]           ...           2 years ago
  • 0.0.36-beta.0 [deprecated]           ...           2 years ago
  • 0.0.35 [deprecated]           ...           2 years ago
  • 0.0.35-beta.3 [deprecated]           ...           2 years ago
  • 0.0.35-beta.2 [deprecated]           ...           2 years ago
  • 0.0.35-beta.1 [deprecated]           ...           2 years ago
  • 0.0.35-beta.0 [deprecated]           ...           2 years ago
  • 0.0.34 [deprecated]           ...           2 years ago
  • 0.0.33-beta.2 [deprecated]           ...           2 years ago
  • 0.0.33-beta.1 [deprecated]           ...           2 years ago
  • 0.0.33-beta.0 [deprecated]           ...           2 years ago
  • 0.0.32 [deprecated]           ...           2 years ago
  • 0.0.32-beta.12 [deprecated]           ...           2 years ago
  • 0.0.32-beta.11 [deprecated]           ...           2 years ago
  • 0.0.32-beta.10 [deprecated]           ...           2 years ago
  • 0.0.32-beta.9 [deprecated]           ...           2 years ago
  • 0.0.32-beta.8 [deprecated]           ...           2 years ago
  • 0.0.32-beta.7 [deprecated]           ...           2 years ago
  • 0.0.32-beta.6 [deprecated]           ...           2 years ago
  • 0.0.32-beta.5 [deprecated]           ...           2 years ago
  • 0.0.32-beta.4 [deprecated]           ...           2 years ago
  • 0.0.32-beta.3 [deprecated]           ...           2 years ago
  • 0.0.32-bate.2 [deprecated]           ...           2 years ago
  • 0.0.32-beta.1 [deprecated]           ...           2 years ago
  • 0.0.32-beta.0 [deprecated]           ...           2 years ago
  • 0.0.31 [deprecated]           ...           2 years ago
  • 0.0.31-beta.0 [deprecated]           ...           2 years ago
  • 0.0.30 [deprecated]           ...           2 years ago
  • 0.0.29-beta.0 [deprecated]           ...           2 years ago
  • 0.0.29 [deprecated]           ...           2 years ago
  • 0.0.28-beta.0 [deprecated]           ...           2 years ago
  • 0.0.27-beta.3 [deprecated]           ...           2 years ago
  • 0.0.28 [deprecated]           ...           2 years ago
  • 0.0.27 [deprecated]           ...           2 years ago
  • 0.0.27-beta.2 [deprecated]           ...           2 years ago
  • 0.0.27-beta.1 [deprecated]           ...           2 years ago
  • 0.0.27-beta.0 [deprecated]           ...           2 years ago
  • 0.0.26 [deprecated]           ...           2 years ago
  • 0.0.25 [deprecated]           ...           2 years ago
  • 0.0.24 [deprecated]           ...           3 years ago
Downloads
Today 0
This Week 169
This Month 713
Last Day 57
Last Week 375
Last Month 646
Dev Dependencies (10)

Copyright 2014 - 2016 © taobao.org |