@tuyaworks/cli
TypeScript icon, indicating that this package has built-in type declarations

0.2.62 • Public • Published

tuyaworks-cli

tuyaworks 命令行程序

安装

sudo npm i -g @tuyaworks/cli --registry https://registry.npmjs.org/

使用

tuyaworks lint-tuya-export --verbose

.npmignore 中的文件会跳过检测

自动生成 jsdoc 注释

# ray 扩展组件
tuyaworks jsdoc-gen -p 'src'

tuyaworks jsdoc-gen -p 'src' -t # 自动翻译(谷歌翻译 API)

# ray 内置组件
tuyaworks jsdoc-gen --cwd ./packages/components/src -p '.tuya.tsx'

本地预览 API

tuyaworks api-preview start

tuyaworks api-preview start --cwd ./packages/components/src -p '.tuya.tsx'

自动生成单测

# 在 ray 组件项目下
tuyaworks gen-tests

搜索 url 链接

tuyaworks get-url
tuyaworks get-url --filter-comment # 去注释,处理 '.js', '.jsx', '.ts', '.tsx' 文件的注释

代码 api 使用

import { getUrls, getUrlsDetail } from '@tuyaworks/cli';

// 只输出url名
getUrls({
  cwd: process.cwd(),
  ignores: ['**/yarn.lock/**'],
  filterComment: true,
}).then(console.log);

// 带有详细信息的
getUrlsDetail({
  cwd: './src',
  ignores: ['**/yarn.lock/**'],
  filterComment: true,
}).then(console.log);

Readme

Keywords

Package Sidebar

Install

npm i @tuyaworks/cli

Weekly Downloads

1

Version

0.2.62

License

MIT

Unpacked Size

307 kB

Total Files

284

Last publish

Collaborators

  • saber2pr
  • tuyafe
  • youngjuning