0.2.0 • Published 4 years ago
iotfe v0.2.0
cli 工具
用法
先全局安装工具:npm install iotfe -g
若不想安装可以使用 npx
,如 npx iotfe init project
Usage: iotfe [options] [command]
Options:
-v, --version Print version information and quit
-h, --help display help for command
Commands:
init|i <project> Create a new project 🚀
fetch|f [options] [assets_name] Fetch assets 🚀
cache|c [options] View or delete cache files 🚀
help [command] display help for command
- 所有命令后面加
-h
可以查看使用帮助,例如iotfe cache -h
- 工具提供的命令可以使用缩写,
init -> i
、fetch -> f
、cache -> c
1、创建一个项目
iotfe init projectName
# or iotfe i projectName
2、获取资产
资产类型:通用组件、非页面级功能块、典型页面模版或模块页面
# Options:
# -l, --list list all assets to choose
iotfe fetch --list
# or iotfe f -l
iotfe fetch assetsName
3、清除缓存
模版和资产文件会被缓存,期限为 7 天
可通过命令查看缓存信息、手动删除缓存
# Options:
# -d, --delete Delete cache
# -i, --info Show cache information
iotfe cache --delete
# or iotfe c -d
iotfe cache --info
# or iotfe c -i