Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block-library: set up auto-generated API docs #14282

Merged
merged 1 commit into from
Mar 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/update-readmes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const packages = [
//'autop',
//'blob',
//'block-editor',
//'block-library',
'block-library',
//'block-serialization-default-parser',
//'blocks',
//'compose',
Expand Down
15 changes: 14 additions & 1 deletion packages/block-library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,25 @@ npm install @wordpress/block-library --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 ES2015+ such as lower versions of IE then using [core-js](https://github.com/zloirock/core-js) or [@babel/polyfill](https://babeljs.io/docs/en/next/babel-polyfill) will add support for these methods. Learn more about it in [Babel docs](https://babeljs.io/docs/en/next/caveats)._

## Usage
## API

<!-- START TOKEN(Autogenerated API docs) -->

### registerCoreBlocks

[src/index.js#L69-L130](src/index.js#L69-L130)

Function to register core blocks provided by the block editor.

**Usage**

```js
import { registerCoreBlocks } from '@wordpress/block-library';

registerCoreBlocks();
```


<!-- END TOKEN(Autogenerated API docs) -->

<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
10 changes: 10 additions & 0 deletions packages/block-library/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ import * as tagCloud from './tag-cloud';

import * as classic from './classic';

/**
* Function to register core blocks provided by the block editor.
*
* @example
* ```js
* import { registerCoreBlocks } from '@wordpress/block-library';
*
* registerCoreBlocks();
* ```
*/
export const registerCoreBlocks = () => {
[
// Common blocks are grouped at the top to prioritize their display
Expand Down