Files

22 lines
495 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Module Spec示例mock
module:
id: mock
name: 本地 MockdevServer 中间件)
entrypoints:
- mock/index.js
- mock/controller
public_api:
concept:
- "route object: { url, type, response }"
usage_examples:
- "在 mock/controller/<domain>.js 增加路由对象devServer 会自动注册"
acceptance:
- "启动开发服务器后,请求命中 mock 并返回 mockjs 数据"
pitfalls:
- "路由匹配会自动拼 baseURL 前缀(来自 src/config"