
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@tuya-sat/create-micro-app
Advanced tools
create-micro-app 是一款通过命令行快速生成微应用模板工具
yarn start
就可以直接快速预览微应用 Demoyarn start:proxy
就可以代理到域名,运行 SaaS 服务关于微应用
NodeJs 要求最低版本为v14.0.0
默认生成 react 模板
npx @tuya-sat/create-micro-app@latest app
生成 react-ts 模板
npx @tuya-sat/create-micro-app@latest app -t react-ts
生成 vue 模板
npx @tuya-sat/create-micro-app@latest app -t vue
生成 vue-ts 模板
npx @tuya-sat/create-micro-app@latest app -t vue-ts
生成主应用模板
npx @tuya-sat/create-micro-app@latest app -t main
字段 | 类型 | 备注 |
---|---|---|
mock | boolean | 控制整体接口是否开启 mock |
api | Api[] | 存放所有的 mock 接口 |
字段 | 类型 | 备注 |
---|---|---|
path | string | 请求路径 |
method | HTTP request methods | http 的请求方式 |
res | Object | 返回参数,此处数据结构为开发者自己定义,请求对应接口就返回 res 内所有内容 |
mock | boolean | 控制此接口是否开启 mock |
yarn start
micro.config.js
yarn statr:proxy
/** @typedef {import("@tuya-sat/micro-dev-proxy").Config} DebuggerConfig */
/** @typedef {import("@tuya-sat/micro-script/dist/config/webpack.config").WebpackCombineFunction} WebpackCombineFunction */
module.exports = {
/**@type {DebuggerConfig} */
debuggerConfig: {
target: 'xxx', // 需要代理的协议+host
username: 'xxxx', // 对应域名的超级管理员账户名
password: 'xxx', // 超级管理员密码
logSign: true, // 打印请求头
},
/**@type {WebpackCombineFunction} */
webpack(config, { isDev, isBuild }) {
config.output.publicPath = isDev ? '/' : '.';
return config;
},
};
yarn build
命令 | 简写 | 类型 | 默认值 | 含义 |
---|---|---|---|---|
--run | -r | boolean|'norun' | false | 值为 norun 时,不安装依赖。值为 true 时,不显示依赖安装过程 |
--dir | -d | boolean | false | 值为 true 时,在当前目录安装 |
--yes | -y | boolean | false | 值为 true 时,使用默认配置安装 |
欢迎在https://github.com/tuya-sat/discuss/issues向我们提交反馈
MIT
FAQs
micro-app cli
The npm package @tuya-sat/create-micro-app receives a total of 65 weekly downloads. As such, @tuya-sat/create-micro-app popularity was classified as not popular.
We found that @tuya-sat/create-micro-app demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.