块编辑器开发文档

@wordpress/list-reusable-blocks

💡 云策文档标注

概述

@wordpress/list-reusable-blocks 是一个 WordPress 包,用于在可重用块列表页面添加导入/导出链接。该包主要与 WordPress 核心配合使用,开发者可在自有项目中使用,但需注意其文档可能不完整。

关键要点

  • 包用途:为可重用块列表页面提供导入/导出功能链接
  • 使用环境:要求 ES2015+ 环境,否则需包含 @wordpress/babel-preset-default 中的 polyfill
  • 安装方式:通过 npm 安装,命令为 npm install @wordpress/list-reusable-blocks --save
  • 项目背景:属于 Gutenberg 项目的独立包,采用 monorepo 结构,贡献需参考项目主贡献指南

📄 原文内容

Package used to add import/export links to the listing page of the reusable blocks.

This package is meant to be used only with WordPress core. Feel free to use it in your own project but please keep in mind that it might never get fully documented.

Installation

Install the module

npm install @wordpress/list-reusable-blocks --save

This package assumes that your code will run in an ES2015+ environment. If you’re using an environment that has limited or no support for such language features and APIs, you should include the polyfill shipped in @wordpress/babel-preset-default in your code.

Contributing to this package

This is an individual package that’s part of the Gutenberg project. The project is organized as a monorepo. It’s made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by WordPress as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project’s main contributor guide.