
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@arco-design/arco-site-anchor
Advanced tools
此项目只有在 Arco 官方 Monorepo 模板中才能正常使用。
// 开发模式
yarn run dev
// 构建
yarn run build
// 生成元数据 arcoMeta
arco generate
// 发布包
arco publish
// 查看当前 arco-scripts 使用的配置
yarn run show:config -- webpack:component
为了帮助他人更好地使用你的组件,请提供详细的 API 文档。
我们使用了 react-docgen-typescripts 来提取组件 Props 的注释,然后自动生成组件的 API 文档。为此,如果你想对外暴露一个 Property,请像下边这样为其书写注释:
// ✅ 可以被正确提取的注释
// 😁 新增的特性推荐标明支持的版本
interface ButtonProps {
/** 按钮的尺寸 */
size?: 'mini' | 'small' | 'default' | 'large';
/** 按钮的状态 (`1.2.0` 开始支持) */
status?: 'danger' | 'error' | 'success';
}
// ❌ 会被忽略的注释
interface ButtonProps {
// 按钮的尺寸
size?: 'mini' | 'small' | 'default' | 'large';
}
TEMPLATE.md 是用于自动文档生成的模板,你可以修改此文件添加更多组件的使用帮助信息,但请不要删除其原有的内容,否则可能导致内容替换失败。
// TEMPLATE.md
---
file: index
---
# ACAnchor
## 属性/Props
%%Props%%
### OtherProps
在这里你可以书写更多组件帮助文档。
## Demos
%%Demos%%
测试目录位于 src/__test__。你可以在 index.test.tsx 中编写你的测试用例,在 demo.test.tsx 中可以进行基于 Demo 的快照测试,所以在增加了新的 Demo 之后,请修改 demo.test.tsx。
yarn run test 命令允许你传入任何 jest 的命令行参数,例如 yarn run test -- --u yarn run test -- --no-cache。
Demo 目录位于 src/demo。你可以在此目录中加入多个 Demo,它们将在 NPM 发布时一同被发布。
如果你添加了一个 Demo,那么你需要在 stories/stories.jsx 添加对应代码,才能在 Storybook 中预览到它。
FAQs
Arco 文档站锚点
We found that @arco-design/arco-site-anchor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.