Cursor rule
.cursor/rules/component-structure.mdcSmartUI 组件目录结构及修改范围
Cursor rules
Quality
38/100
Scores the file, not the repository.Length
103 words
5 headings · 0 code blocksRepository
2
— · pushed 2 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# 组件目录与修改范围89## 修改范围1011- **仅修改 `packages/` 下代码**;`example/` 为打包产物目录,勿直接改。12- 开发时只改动 packages 内组件与 demo,打包会把 packages 下 demo 打到 example/dist。1314## 单组件目录结构1516| 路径 | 说明 |17|------|------|18| `demo/` | 组件 demo 入口,含 index.wxml/ts/less/json |19| `test/` | 测试用例,至少含 demo.spec.ts,可选 index.spec.ts |20| `index.json` | 基础配置,子组件在 `usingComponents` 中声明 |21| `index.less` | 样式,会自动加载 |22| `index.ts` | 主逻辑,使用 SmartComponent 封装 |23| `index.wxml` | 模板 |24| `index.wxs` | 可选,模板内计算逻辑,**仅 ES5** |25| `README.md` / `README.en.md` | 文档 |2627## index.json 与子组件2829- 声明 `"component": true`。30- 依赖子组件用相对路径,例如:`"smart-icon": "../icon/index"`。3132## 组件封装方式3334- 使用 `SmartComponent`(来自 `../common/component`)。35- 选项映射:`data`、`props`→properties、`watch`→observers、`mixins`→behaviors、`created`→attached、`mounted`→ready、`destroyed`→detached。36- 常用从 `../mixins/` 或 `../common/` 引入能力。37
Also in Tuya-Community/miniapp-smart-ui
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Tuya-Community/miniapp-smart-ui.cursor/rules/wxs-es5.mdc · 2 | Cursor rules | no sections | 39/100 | 3 days ago | |
| Tuya-Community/miniapp-smart-ui.cursor/rules/demo-and-i18n.mdc · 2 | Cursor rules | testdocs | 50/100 | 3 days ago | |
| Tuya-Community/miniapp-smart-ui.cursor/rules/miniapp-test.mdc · 2 | Cursor rules | test | 63/100 | 3 days ago | |
| Tuya-Community/miniapp-smart-uiAGENTS.md · 2 | AGENTS.md | setuptest | 34/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
