From e9d28c34a2c28916df58b30c37265dbb14f2b250 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Fri, 22 Jul 2022 11:43:01 +0200 Subject: [PATCH] Introduce `init.js` to all core blocks --- packages/block-library/package.json | 1 + packages/block-library/src/archives/index.js | 3 +++ packages/block-library/src/archives/init.js | 5 ++--- packages/block-library/src/audio/index.js | 3 +++ packages/block-library/src/audio/init.js | 6 ++++++ packages/block-library/src/avatar/index.js | 3 +++ packages/block-library/src/avatar/init.js | 6 ++++++ packages/block-library/src/block/index.js | 3 +++ packages/block-library/src/block/init.js | 6 ++++++ packages/block-library/src/button/index.js | 3 +++ packages/block-library/src/button/init.js | 6 ++++++ packages/block-library/src/buttons/index.js | 3 +++ packages/block-library/src/buttons/init.js | 6 ++++++ packages/block-library/src/calendar/index.js | 3 +++ packages/block-library/src/calendar/init.js | 6 ++++++ packages/block-library/src/categories/index.js | 3 +++ packages/block-library/src/categories/init.js | 6 ++++++ packages/block-library/src/code/index.js | 3 +++ packages/block-library/src/code/init.js | 6 ++++++ packages/block-library/src/column/index.js | 3 +++ packages/block-library/src/column/init.js | 6 ++++++ packages/block-library/src/columns/index.js | 3 +++ packages/block-library/src/columns/init.js | 6 ++++++ .../src/comment-author-avatar/index.js | 3 +++ .../block-library/src/comment-author-avatar/init.js | 6 ++++++ .../block-library/src/comment-author-name/index.js | 3 +++ .../block-library/src/comment-author-name/init.js | 6 ++++++ packages/block-library/src/comment-content/index.js | 3 +++ packages/block-library/src/comment-content/init.js | 6 ++++++ packages/block-library/src/comment-date/index.js | 3 +++ packages/block-library/src/comment-date/init.js | 6 ++++++ .../block-library/src/comment-edit-link/index.js | 3 +++ .../block-library/src/comment-edit-link/init.js | 6 ++++++ .../block-library/src/comment-reply-link/index.js | 3 +++ .../block-library/src/comment-reply-link/init.js | 6 ++++++ .../block-library/src/comment-template/index.js | 3 +++ packages/block-library/src/comment-template/init.js | 6 ++++++ .../src/comments-pagination-next/index.js | 3 +++ .../src/comments-pagination-next/init.js | 6 ++++++ .../src/comments-pagination-numbers/index.js | 3 +++ .../src/comments-pagination-numbers/init.js | 6 ++++++ .../src/comments-pagination-previous/index.js | 3 +++ .../src/comments-pagination-previous/init.js | 6 ++++++ .../block-library/src/comments-pagination/index.js | 3 +++ .../block-library/src/comments-pagination/init.js | 6 ++++++ packages/block-library/src/comments-title/index.js | 3 +++ packages/block-library/src/comments-title/init.js | 6 ++++++ packages/block-library/src/comments/index.js | 3 +++ packages/block-library/src/comments/init.js | 6 ++++++ packages/block-library/src/cover/index.js | 3 +++ packages/block-library/src/cover/init.js | 6 ++++++ packages/block-library/src/embed/index.js | 3 +++ packages/block-library/src/embed/init.js | 6 ++++++ packages/block-library/src/file/index.js | 3 +++ packages/block-library/src/file/init.js | 6 ++++++ packages/block-library/src/freeform/index.js | 3 +++ packages/block-library/src/freeform/init.js | 6 ++++++ packages/block-library/src/gallery/index.js | 3 +++ packages/block-library/src/gallery/init.js | 6 ++++++ packages/block-library/src/group/index.js | 3 +++ packages/block-library/src/group/init.js | 6 ++++++ packages/block-library/src/heading/index.js | 3 +++ packages/block-library/src/heading/init.js | 6 ++++++ packages/block-library/src/home-link/index.js | 3 +++ packages/block-library/src/home-link/init.js | 6 ++++++ packages/block-library/src/html/index.js | 3 +++ packages/block-library/src/html/init.js | 6 ++++++ packages/block-library/src/image/index.js | 3 +++ packages/block-library/src/image/init.js | 6 ++++++ packages/block-library/src/latest-comments/index.js | 3 +++ packages/block-library/src/latest-comments/init.js | 6 ++++++ packages/block-library/src/latest-posts/index.js | 3 +++ packages/block-library/src/latest-posts/init.js | 6 ++++++ packages/block-library/src/list-item/index.js | 3 +++ packages/block-library/src/list-item/init.js | 6 ++++++ packages/block-library/src/list/index.js | 3 +++ packages/block-library/src/list/init.js | 6 ++++++ packages/block-library/src/loginout/index.js | 3 +++ packages/block-library/src/loginout/init.js | 6 ++++++ packages/block-library/src/media-text/index.js | 3 +++ packages/block-library/src/media-text/init.js | 6 ++++++ packages/block-library/src/missing/index.js | 3 +++ packages/block-library/src/missing/init.js | 6 ++++++ packages/block-library/src/more/index.js | 3 +++ packages/block-library/src/more/init.js | 6 ++++++ packages/block-library/src/navigation-link/index.js | 3 +++ packages/block-library/src/navigation-link/init.js | 6 ++++++ .../block-library/src/navigation-submenu/index.js | 4 +++- .../block-library/src/navigation-submenu/init.js | 6 ++++++ packages/block-library/src/navigation/index.js | 3 +++ packages/block-library/src/navigation/init.js | 6 ++++++ packages/block-library/src/nextpage/index.js | 3 +++ packages/block-library/src/nextpage/init.js | 6 ++++++ packages/block-library/src/page-list/index.js | 3 +++ packages/block-library/src/page-list/init.js | 6 ++++++ packages/block-library/src/paragraph/index.js | 3 +++ packages/block-library/src/paragraph/init.js | 6 ++++++ packages/block-library/src/pattern/index.js | 3 +++ packages/block-library/src/pattern/init.js | 6 ++++++ .../src/post-author-biography/index.js | 13 ++++++++----- .../block-library/src/post-author-biography/init.js | 6 ++++++ .../block-library/src/post-author-name/index.js | 13 ++++++++----- packages/block-library/src/post-author-name/init.js | 6 ++++++ packages/block-library/src/post-author/index.js | 13 ++++++++----- packages/block-library/src/post-author/init.js | 6 ++++++ packages/block-library/src/post-comment/index.js | 3 +++ packages/block-library/src/post-comment/init.js | 6 ++++++ .../block-library/src/post-comments-count/index.js | 3 +++ .../block-library/src/post-comments-count/init.js | 6 ++++++ .../block-library/src/post-comments-form/index.js | 3 +++ .../block-library/src/post-comments-form/init.js | 6 ++++++ .../block-library/src/post-comments-link/index.js | 3 +++ .../block-library/src/post-comments-link/init.js | 6 ++++++ packages/block-library/src/post-comments/index.js | 3 +++ packages/block-library/src/post-comments/init.js | 6 ++++++ packages/block-library/src/post-content/index.js | 3 +++ packages/block-library/src/post-content/init.js | 6 ++++++ packages/block-library/src/post-date/index.js | 3 +++ packages/block-library/src/post-date/init.js | 6 ++++++ packages/block-library/src/post-excerpt/index.js | 3 +++ packages/block-library/src/post-excerpt/init.js | 6 ++++++ .../block-library/src/post-featured-image/index.js | 3 +++ .../block-library/src/post-featured-image/init.js | 6 ++++++ .../block-library/src/post-navigation-link/index.js | 3 +++ .../block-library/src/post-navigation-link/init.js | 6 ++++++ packages/block-library/src/post-template/index.js | 3 +++ packages/block-library/src/post-template/init.js | 6 ++++++ packages/block-library/src/post-terms/index.js | 3 +++ packages/block-library/src/post-terms/init.js | 6 ++++++ packages/block-library/src/post-title/index.js | 3 +++ packages/block-library/src/post-title/init.js | 6 ++++++ packages/block-library/src/preformatted/index.js | 3 +++ packages/block-library/src/preformatted/init.js | 6 ++++++ packages/block-library/src/pullquote/index.js | 3 +++ packages/block-library/src/pullquote/init.js | 6 ++++++ .../block-library/src/query-no-results/index.js | 3 +++ packages/block-library/src/query-no-results/init.js | 6 ++++++ .../src/query-pagination-next/index.js | 3 +++ .../block-library/src/query-pagination-next/init.js | 6 ++++++ .../src/query-pagination-numbers/index.js | 3 +++ .../src/query-pagination-numbers/init.js | 6 ++++++ .../src/query-pagination-previous/index.js | 3 +++ .../src/query-pagination-previous/init.js | 6 ++++++ .../block-library/src/query-pagination/index.js | 3 +++ packages/block-library/src/query-pagination/init.js | 6 ++++++ packages/block-library/src/query-title/index.js | 13 ++++++++----- packages/block-library/src/query-title/init.js | 6 ++++++ packages/block-library/src/query/index.js | 3 +++ packages/block-library/src/query/init.js | 6 ++++++ packages/block-library/src/quote/index.js | 3 +++ packages/block-library/src/quote/init.js | 6 ++++++ packages/block-library/src/read-more/index.js | 3 +++ packages/block-library/src/read-more/init.js | 6 ++++++ packages/block-library/src/rss/index.js | 3 +++ packages/block-library/src/rss/init.js | 6 ++++++ packages/block-library/src/search/index.js | 3 +++ packages/block-library/src/search/init.js | 6 ++++++ packages/block-library/src/separator/index.js | 3 +++ packages/block-library/src/separator/init.js | 6 ++++++ packages/block-library/src/shortcode/index.js | 3 +++ packages/block-library/src/shortcode/init.js | 6 ++++++ packages/block-library/src/site-logo/index.js | 3 +++ packages/block-library/src/site-logo/init.js | 6 ++++++ packages/block-library/src/site-tagline/index.js | 3 +++ packages/block-library/src/site-tagline/init.js | 6 ++++++ packages/block-library/src/site-title/index.js | 3 +++ packages/block-library/src/site-title/init.js | 6 ++++++ packages/block-library/src/social-link/index.js | 3 +++ packages/block-library/src/social-link/init.js | 6 ++++++ packages/block-library/src/social-links/index.js | 3 +++ packages/block-library/src/social-links/init.js | 6 ++++++ packages/block-library/src/spacer/index.js | 3 +++ packages/block-library/src/spacer/init.js | 6 ++++++ .../block-library/src/table-of-contents/index.js | 3 +++ .../block-library/src/table-of-contents/init.js | 6 ++++++ packages/block-library/src/table/index.js | 3 +++ packages/block-library/src/table/init.js | 6 ++++++ packages/block-library/src/tag-cloud/index.js | 3 +++ packages/block-library/src/tag-cloud/init.js | 6 ++++++ packages/block-library/src/template-part/index.js | 3 +++ packages/block-library/src/template-part/init.js | 6 ++++++ .../block-library/src/term-description/index.js | 3 +++ packages/block-library/src/term-description/init.js | 6 ++++++ packages/block-library/src/text-columns/index.js | 3 +++ packages/block-library/src/text-columns/init.js | 6 ++++++ packages/block-library/src/verse/index.js | 3 +++ packages/block-library/src/verse/init.js | 6 ++++++ packages/block-library/src/video/index.js | 3 +++ packages/block-library/src/video/init.js | 6 ++++++ 189 files changed, 863 insertions(+), 24 deletions(-) create mode 100644 packages/block-library/src/audio/init.js create mode 100644 packages/block-library/src/avatar/init.js create mode 100644 packages/block-library/src/block/init.js create mode 100644 packages/block-library/src/button/init.js create mode 100644 packages/block-library/src/buttons/init.js create mode 100644 packages/block-library/src/calendar/init.js create mode 100644 packages/block-library/src/categories/init.js create mode 100644 packages/block-library/src/code/init.js create mode 100644 packages/block-library/src/column/init.js create mode 100644 packages/block-library/src/columns/init.js create mode 100644 packages/block-library/src/comment-author-avatar/init.js create mode 100644 packages/block-library/src/comment-author-name/init.js create mode 100644 packages/block-library/src/comment-content/init.js create mode 100644 packages/block-library/src/comment-date/init.js create mode 100644 packages/block-library/src/comment-edit-link/init.js create mode 100644 packages/block-library/src/comment-reply-link/init.js create mode 100644 packages/block-library/src/comment-template/init.js create mode 100644 packages/block-library/src/comments-pagination-next/init.js create mode 100644 packages/block-library/src/comments-pagination-numbers/init.js create mode 100644 packages/block-library/src/comments-pagination-previous/init.js create mode 100644 packages/block-library/src/comments-pagination/init.js create mode 100644 packages/block-library/src/comments-title/init.js create mode 100644 packages/block-library/src/comments/init.js create mode 100644 packages/block-library/src/cover/init.js create mode 100644 packages/block-library/src/embed/init.js create mode 100644 packages/block-library/src/file/init.js create mode 100644 packages/block-library/src/freeform/init.js create mode 100644 packages/block-library/src/gallery/init.js create mode 100644 packages/block-library/src/group/init.js create mode 100644 packages/block-library/src/heading/init.js create mode 100644 packages/block-library/src/home-link/init.js create mode 100644 packages/block-library/src/html/init.js create mode 100644 packages/block-library/src/image/init.js create mode 100644 packages/block-library/src/latest-comments/init.js create mode 100644 packages/block-library/src/latest-posts/init.js create mode 100644 packages/block-library/src/list-item/init.js create mode 100644 packages/block-library/src/list/init.js create mode 100644 packages/block-library/src/loginout/init.js create mode 100644 packages/block-library/src/media-text/init.js create mode 100644 packages/block-library/src/missing/init.js create mode 100644 packages/block-library/src/more/init.js create mode 100644 packages/block-library/src/navigation-link/init.js create mode 100644 packages/block-library/src/navigation-submenu/init.js create mode 100644 packages/block-library/src/navigation/init.js create mode 100644 packages/block-library/src/nextpage/init.js create mode 100644 packages/block-library/src/page-list/init.js create mode 100644 packages/block-library/src/paragraph/init.js create mode 100644 packages/block-library/src/pattern/init.js create mode 100644 packages/block-library/src/post-author-biography/init.js create mode 100644 packages/block-library/src/post-author-name/init.js create mode 100644 packages/block-library/src/post-author/init.js create mode 100644 packages/block-library/src/post-comment/init.js create mode 100644 packages/block-library/src/post-comments-count/init.js create mode 100644 packages/block-library/src/post-comments-form/init.js create mode 100644 packages/block-library/src/post-comments-link/init.js create mode 100644 packages/block-library/src/post-comments/init.js create mode 100644 packages/block-library/src/post-content/init.js create mode 100644 packages/block-library/src/post-date/init.js create mode 100644 packages/block-library/src/post-excerpt/init.js create mode 100644 packages/block-library/src/post-featured-image/init.js create mode 100644 packages/block-library/src/post-navigation-link/init.js create mode 100644 packages/block-library/src/post-template/init.js create mode 100644 packages/block-library/src/post-terms/init.js create mode 100644 packages/block-library/src/post-title/init.js create mode 100644 packages/block-library/src/preformatted/init.js create mode 100644 packages/block-library/src/pullquote/init.js create mode 100644 packages/block-library/src/query-no-results/init.js create mode 100644 packages/block-library/src/query-pagination-next/init.js create mode 100644 packages/block-library/src/query-pagination-numbers/init.js create mode 100644 packages/block-library/src/query-pagination-previous/init.js create mode 100644 packages/block-library/src/query-pagination/init.js create mode 100644 packages/block-library/src/query-title/init.js create mode 100644 packages/block-library/src/query/init.js create mode 100644 packages/block-library/src/quote/init.js create mode 100644 packages/block-library/src/read-more/init.js create mode 100644 packages/block-library/src/rss/init.js create mode 100644 packages/block-library/src/search/init.js create mode 100644 packages/block-library/src/separator/init.js create mode 100644 packages/block-library/src/shortcode/init.js create mode 100644 packages/block-library/src/site-logo/init.js create mode 100644 packages/block-library/src/site-tagline/init.js create mode 100644 packages/block-library/src/site-title/init.js create mode 100644 packages/block-library/src/social-link/init.js create mode 100644 packages/block-library/src/social-links/init.js create mode 100644 packages/block-library/src/spacer/init.js create mode 100644 packages/block-library/src/table-of-contents/init.js create mode 100644 packages/block-library/src/table/init.js create mode 100644 packages/block-library/src/tag-cloud/init.js create mode 100644 packages/block-library/src/template-part/init.js create mode 100644 packages/block-library/src/term-description/init.js create mode 100644 packages/block-library/src/text-columns/init.js create mode 100644 packages/block-library/src/verse/init.js create mode 100644 packages/block-library/src/video/init.js diff --git a/packages/block-library/package.json b/packages/block-library/package.json index 9dbca1ea7b85a..0871b15394ffb 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -27,6 +27,7 @@ "sideEffects": [ "build-style/**", "src/**/*.scss", + "src/*/init.js", "src/navigation-link/index.js", "src/template-part/index.js", "src/query/index.js", diff --git a/packages/block-library/src/archives/index.js b/packages/block-library/src/archives/index.js index e1f01f30a7187..40844eb9cb7d7 100644 --- a/packages/block-library/src/archives/index.js +++ b/packages/block-library/src/archives/index.js @@ -6,6 +6,7 @@ import { archive as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -18,3 +19,5 @@ export const settings = { example: {}, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/archives/init.js b/packages/block-library/src/archives/init.js index c1fb9560b48ee..79f0492c2cb2f 100644 --- a/packages/block-library/src/archives/init.js +++ b/packages/block-library/src/archives/init.js @@ -1,7 +1,6 @@ /** * Internal dependencies */ -import * as block from './'; -import initBlock from '../utils/init-block'; +import { init } from './'; -export default initBlock( block ); +export default init(); diff --git a/packages/block-library/src/audio/index.js b/packages/block-library/src/audio/index.js index d3047dd5af445..0d3d05936ef90 100644 --- a/packages/block-library/src/audio/index.js +++ b/packages/block-library/src/audio/index.js @@ -6,6 +6,7 @@ import { audio as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -28,3 +29,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/audio/init.js b/packages/block-library/src/audio/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/audio/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/avatar/index.js b/packages/block-library/src/avatar/index.js index ef71f2751459a..d318450aec390 100644 --- a/packages/block-library/src/avatar/index.js +++ b/packages/block-library/src/avatar/index.js @@ -6,6 +6,7 @@ import { commentAuthorAvatar as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/avatar/init.js b/packages/block-library/src/avatar/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/avatar/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/block/index.js b/packages/block-library/src/block/index.js index fff0109a543ac..95e090f0afd6a 100644 --- a/packages/block-library/src/block/index.js +++ b/packages/block-library/src/block/index.js @@ -6,6 +6,7 @@ import { symbol as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -17,3 +18,5 @@ export const settings = { edit, icon, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/block/init.js b/packages/block-library/src/block/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/block/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/button/index.js b/packages/block-library/src/button/index.js index c454e46bf681b..2b05b280028ab 100644 --- a/packages/block-library/src/button/index.js +++ b/packages/block-library/src/button/index.js @@ -7,6 +7,7 @@ import { button as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -32,3 +33,5 @@ export const settings = { text: ( a.text || '' ) + text, } ), }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/button/init.js b/packages/block-library/src/button/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/button/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/buttons/index.js b/packages/block-library/src/buttons/index.js index 52d406e0ca976..810922fbcb839 100644 --- a/packages/block-library/src/buttons/index.js +++ b/packages/block-library/src/buttons/index.js @@ -7,6 +7,7 @@ import { buttons as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import transforms from './transforms'; import edit from './edit'; @@ -36,3 +37,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/buttons/init.js b/packages/block-library/src/buttons/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/buttons/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/calendar/index.js b/packages/block-library/src/calendar/index.js index a8fed300b171e..7fff20826e271 100644 --- a/packages/block-library/src/calendar/index.js +++ b/packages/block-library/src/calendar/index.js @@ -6,6 +6,7 @@ import { calendar as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import transforms from './transforms'; @@ -20,3 +21,5 @@ export const settings = { edit, transforms, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/calendar/init.js b/packages/block-library/src/calendar/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/calendar/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/categories/index.js b/packages/block-library/src/categories/index.js index 9698dacfdaff3..8cdcad450862a 100644 --- a/packages/block-library/src/categories/index.js +++ b/packages/block-library/src/categories/index.js @@ -6,6 +6,7 @@ import { category as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -18,3 +19,5 @@ export const settings = { example: {}, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/categories/init.js b/packages/block-library/src/categories/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/categories/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/code/index.js b/packages/block-library/src/code/index.js index 8301b13d9ff57..08e2fffaf5480 100644 --- a/packages/block-library/src/code/index.js +++ b/packages/block-library/src/code/index.js @@ -7,6 +7,7 @@ import { code as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import save from './save'; @@ -32,3 +33,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/code/init.js b/packages/block-library/src/code/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/code/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/column/index.js b/packages/block-library/src/column/index.js index e935e682f45ca..687b8c180b1f5 100644 --- a/packages/block-library/src/column/index.js +++ b/packages/block-library/src/column/index.js @@ -6,6 +6,7 @@ import { column as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -21,3 +22,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/column/init.js b/packages/block-library/src/column/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/column/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/columns/index.js b/packages/block-library/src/columns/index.js index d5185f0ee368a..45f7bd70e61ff 100644 --- a/packages/block-library/src/columns/index.js +++ b/packages/block-library/src/columns/index.js @@ -7,6 +7,7 @@ import { columns as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -83,3 +84,5 @@ export const settings = { save, transforms, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/columns/init.js b/packages/block-library/src/columns/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/columns/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comment-author-avatar/index.js b/packages/block-library/src/comment-author-avatar/index.js index ef71f2751459a..d318450aec390 100644 --- a/packages/block-library/src/comment-author-avatar/index.js +++ b/packages/block-library/src/comment-author-avatar/index.js @@ -6,6 +6,7 @@ import { commentAuthorAvatar as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comment-author-avatar/init.js b/packages/block-library/src/comment-author-avatar/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comment-author-avatar/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comment-author-name/index.js b/packages/block-library/src/comment-author-name/index.js index d1481d359b0a0..4d85bbebe047b 100644 --- a/packages/block-library/src/comment-author-name/index.js +++ b/packages/block-library/src/comment-author-name/index.js @@ -6,6 +6,7 @@ import { commentAuthorName as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import deprecated from './deprecated'; @@ -18,3 +19,5 @@ export const settings = { edit, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comment-author-name/init.js b/packages/block-library/src/comment-author-name/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comment-author-name/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comment-content/index.js b/packages/block-library/src/comment-content/index.js index 6020aab70e0f8..130f1d3012555 100644 --- a/packages/block-library/src/comment-content/index.js +++ b/packages/block-library/src/comment-content/index.js @@ -6,6 +6,7 @@ import { commentContent as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comment-content/init.js b/packages/block-library/src/comment-content/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comment-content/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comment-date/index.js b/packages/block-library/src/comment-date/index.js index c2384da69192d..fddae539acfa3 100644 --- a/packages/block-library/src/comment-date/index.js +++ b/packages/block-library/src/comment-date/index.js @@ -6,6 +6,7 @@ import { postDate as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import deprecated from './deprecated'; @@ -18,3 +19,5 @@ export const settings = { edit, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comment-date/init.js b/packages/block-library/src/comment-date/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comment-date/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comment-edit-link/index.js b/packages/block-library/src/comment-edit-link/index.js index 8e1ee77e388b4..6639dda86a7a4 100644 --- a/packages/block-library/src/comment-edit-link/index.js +++ b/packages/block-library/src/comment-edit-link/index.js @@ -6,6 +6,7 @@ import { commentEditLink as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comment-edit-link/init.js b/packages/block-library/src/comment-edit-link/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comment-edit-link/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comment-reply-link/index.js b/packages/block-library/src/comment-reply-link/index.js index 491c0ca7d95e1..c04f8ce7b1bba 100644 --- a/packages/block-library/src/comment-reply-link/index.js +++ b/packages/block-library/src/comment-reply-link/index.js @@ -6,6 +6,7 @@ import { commentReplyLink as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { edit, icon, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comment-reply-link/init.js b/packages/block-library/src/comment-reply-link/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comment-reply-link/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comment-template/index.js b/packages/block-library/src/comment-template/index.js index b6e6d280626bf..afc295cad4c12 100644 --- a/packages/block-library/src/comment-template/index.js +++ b/packages/block-library/src/comment-template/index.js @@ -6,6 +6,7 @@ import { layout as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -18,3 +19,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comment-template/init.js b/packages/block-library/src/comment-template/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comment-template/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comments-pagination-next/index.js b/packages/block-library/src/comments-pagination-next/index.js index d339ed2ca7581..2df0e8da6aa99 100644 --- a/packages/block-library/src/comments-pagination-next/index.js +++ b/packages/block-library/src/comments-pagination-next/index.js @@ -6,6 +6,7 @@ import { queryPaginationNext as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comments-pagination-next/init.js b/packages/block-library/src/comments-pagination-next/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comments-pagination-next/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comments-pagination-numbers/index.js b/packages/block-library/src/comments-pagination-numbers/index.js index 9f1818b1f14a0..3fd903e2d9ef4 100644 --- a/packages/block-library/src/comments-pagination-numbers/index.js +++ b/packages/block-library/src/comments-pagination-numbers/index.js @@ -6,6 +6,7 @@ import { queryPaginationNumbers as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comments-pagination-numbers/init.js b/packages/block-library/src/comments-pagination-numbers/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comments-pagination-numbers/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comments-pagination-previous/index.js b/packages/block-library/src/comments-pagination-previous/index.js index a66be07616944..80e555ccc79d9 100644 --- a/packages/block-library/src/comments-pagination-previous/index.js +++ b/packages/block-library/src/comments-pagination-previous/index.js @@ -6,6 +6,7 @@ import { queryPaginationPrevious as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comments-pagination-previous/init.js b/packages/block-library/src/comments-pagination-previous/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comments-pagination-previous/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comments-pagination/index.js b/packages/block-library/src/comments-pagination/index.js index a15bdd4389cee..3d9bc853db140 100644 --- a/packages/block-library/src/comments-pagination/index.js +++ b/packages/block-library/src/comments-pagination/index.js @@ -6,6 +6,7 @@ import { queryPagination as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -18,3 +19,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comments-pagination/init.js b/packages/block-library/src/comments-pagination/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comments-pagination/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comments-title/index.js b/packages/block-library/src/comments-title/index.js index 374a379746df3..86bdab0dbccbf 100644 --- a/packages/block-library/src/comments-title/index.js +++ b/packages/block-library/src/comments-title/index.js @@ -6,6 +6,7 @@ import { title as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import deprecated from './deprecated'; @@ -18,3 +19,5 @@ export const settings = { edit, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comments-title/init.js b/packages/block-library/src/comments-title/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comments-title/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/comments/index.js b/packages/block-library/src/comments/index.js index 9cecb54f5a64d..21db8b986d6e5 100644 --- a/packages/block-library/src/comments/index.js +++ b/packages/block-library/src/comments/index.js @@ -6,6 +6,7 @@ import { postComments as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import deprecated from './deprecated'; import edit from './edit'; @@ -20,3 +21,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/comments/init.js b/packages/block-library/src/comments/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/comments/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/cover/index.js b/packages/block-library/src/cover/index.js index 89576d2ae55e1..45d91ab1e5c41 100644 --- a/packages/block-library/src/cover/index.js +++ b/packages/block-library/src/cover/index.js @@ -7,6 +7,7 @@ import { cover as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -41,3 +42,5 @@ export const settings = { edit, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/cover/init.js b/packages/block-library/src/cover/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/cover/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/embed/index.js b/packages/block-library/src/embed/index.js index 5f0e38c1aabf2..065cf9665fa9b 100644 --- a/packages/block-library/src/embed/index.js +++ b/packages/block-library/src/embed/index.js @@ -1,6 +1,7 @@ /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import save from './save'; import metadata from './block.json'; @@ -20,3 +21,5 @@ export const settings = { variations, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/embed/init.js b/packages/block-library/src/embed/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/embed/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/file/index.js b/packages/block-library/src/file/index.js index bf2b6a6b918f1..46b9691ea88a7 100644 --- a/packages/block-library/src/file/index.js +++ b/packages/block-library/src/file/index.js @@ -7,6 +7,7 @@ import { file as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -30,3 +31,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/file/init.js b/packages/block-library/src/file/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/file/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/freeform/index.js b/packages/block-library/src/freeform/index.js index b4d7cf715442b..e94a459487b89 100644 --- a/packages/block-library/src/freeform/index.js +++ b/packages/block-library/src/freeform/index.js @@ -6,6 +6,7 @@ import { classic as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import save from './save'; @@ -19,3 +20,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/freeform/init.js b/packages/block-library/src/freeform/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/freeform/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/gallery/index.js b/packages/block-library/src/gallery/index.js index c9b82278a507a..f865072526098 100644 --- a/packages/block-library/src/gallery/index.js +++ b/packages/block-library/src/gallery/index.js @@ -6,6 +6,7 @@ import { gallery as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit-wrapper'; import metadata from './block.json'; @@ -42,3 +43,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/gallery/init.js b/packages/block-library/src/gallery/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/gallery/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/group/index.js b/packages/block-library/src/group/index.js index ddee42e095f7a..2d06f1a965c52 100644 --- a/packages/block-library/src/group/index.js +++ b/packages/block-library/src/group/index.js @@ -7,6 +7,7 @@ import { group as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -86,3 +87,5 @@ export const settings = { deprecated, variations, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/group/init.js b/packages/block-library/src/group/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/group/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/heading/index.js b/packages/block-library/src/heading/index.js index e829a7ae15108..56bf1f670e92d 100644 --- a/packages/block-library/src/heading/index.js +++ b/packages/block-library/src/heading/index.js @@ -12,6 +12,7 @@ import { __, sprintf } from '@wordpress/i18n'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -66,3 +67,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/heading/init.js b/packages/block-library/src/heading/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/heading/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/home-link/index.js b/packages/block-library/src/home-link/index.js index 5bb3914bb1bf3..71d62dcd8c44e 100644 --- a/packages/block-library/src/home-link/index.js +++ b/packages/block-library/src/home-link/index.js @@ -7,6 +7,7 @@ import { home } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -28,3 +29,5 @@ export const settings = { }, }, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/home-link/init.js b/packages/block-library/src/home-link/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/home-link/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/html/index.js b/packages/block-library/src/html/index.js index cb1fb915ee8b5..cd25f25126a61 100644 --- a/packages/block-library/src/html/index.js +++ b/packages/block-library/src/html/index.js @@ -7,6 +7,7 @@ import { html as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import save from './save'; @@ -30,3 +31,5 @@ export const settings = { save, transforms, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/html/init.js b/packages/block-library/src/html/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/html/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/image/index.js b/packages/block-library/src/image/index.js index dcdbd4e76882c..1477fa99c702c 100644 --- a/packages/block-library/src/image/index.js +++ b/packages/block-library/src/image/index.js @@ -7,6 +7,7 @@ import { image as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -54,3 +55,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/image/init.js b/packages/block-library/src/image/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/image/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/latest-comments/index.js b/packages/block-library/src/latest-comments/index.js index 6497e8b5b927d..5c2bab45638df 100644 --- a/packages/block-library/src/latest-comments/index.js +++ b/packages/block-library/src/latest-comments/index.js @@ -6,6 +6,7 @@ import { comment as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -18,3 +19,5 @@ export const settings = { example: {}, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/latest-comments/init.js b/packages/block-library/src/latest-comments/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/latest-comments/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/latest-posts/index.js b/packages/block-library/src/latest-posts/index.js index a0f8ffa74898b..5ea877488d72a 100644 --- a/packages/block-library/src/latest-posts/index.js +++ b/packages/block-library/src/latest-posts/index.js @@ -6,6 +6,7 @@ import { postList as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -19,3 +20,5 @@ export const settings = { edit, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/latest-posts/init.js b/packages/block-library/src/latest-posts/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/latest-posts/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/list-item/index.js b/packages/block-library/src/list-item/index.js index 480f811c85c1e..61756019baf92 100644 --- a/packages/block-library/src/list-item/index.js +++ b/packages/block-library/src/list-item/index.js @@ -6,6 +6,7 @@ import { listItem as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -25,3 +26,5 @@ export const settings = { }; }, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/list-item/init.js b/packages/block-library/src/list-item/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/list-item/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/list/index.js b/packages/block-library/src/list/index.js index bef6b6558df89..93674e13587af 100644 --- a/packages/block-library/src/list/index.js +++ b/packages/block-library/src/list/index.js @@ -6,6 +6,7 @@ import { list as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -49,3 +50,5 @@ if ( process.env.IS_GUTENBERG_PLUGIN ) { : settingsV1; } export { settings }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/list/init.js b/packages/block-library/src/list/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/list/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/loginout/index.js b/packages/block-library/src/loginout/index.js index 4f91f96242217..65c611621fd62 100644 --- a/packages/block-library/src/loginout/index.js +++ b/packages/block-library/src/loginout/index.js @@ -6,6 +6,7 @@ import { login as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/loginout/init.js b/packages/block-library/src/loginout/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/loginout/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/media-text/index.js b/packages/block-library/src/media-text/index.js index 3b7bf4b889ee9..373050cb77fd5 100644 --- a/packages/block-library/src/media-text/index.js +++ b/packages/block-library/src/media-text/index.js @@ -7,6 +7,7 @@ import { mediaAndText as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -48,3 +49,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/media-text/init.js b/packages/block-library/src/media-text/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/media-text/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/missing/index.js b/packages/block-library/src/missing/index.js index 97db4e5c09b69..766381156eb34 100644 --- a/packages/block-library/src/missing/index.js +++ b/packages/block-library/src/missing/index.js @@ -6,6 +6,7 @@ import { getBlockType } from '@wordpress/blocks'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import save from './save'; @@ -34,3 +35,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/missing/init.js b/packages/block-library/src/missing/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/missing/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/more/index.js b/packages/block-library/src/more/index.js index efe76cf07a17f..4c1fad3cb67f4 100644 --- a/packages/block-library/src/more/index.js +++ b/packages/block-library/src/more/index.js @@ -6,6 +6,7 @@ import { more as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import save from './save'; @@ -27,3 +28,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/more/init.js b/packages/block-library/src/more/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/more/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/navigation-link/index.js b/packages/block-library/src/navigation-link/index.js index 04389ffb7d10d..795f38b451d6f 100644 --- a/packages/block-library/src/navigation-link/index.js +++ b/packages/block-library/src/navigation-link/index.js @@ -9,6 +9,7 @@ import { addFilter } from '@wordpress/hooks'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -94,3 +95,5 @@ addFilter( 'core/navigation-link', enhanceNavigationLinkVariations ); + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/navigation-link/init.js b/packages/block-library/src/navigation-link/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/navigation-link/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/navigation-submenu/index.js b/packages/block-library/src/navigation-submenu/index.js index 9d270e3c9e003..c14ae6096fc9f 100644 --- a/packages/block-library/src/navigation-submenu/index.js +++ b/packages/block-library/src/navigation-submenu/index.js @@ -6,7 +6,7 @@ import { addSubmenu } from '@wordpress/icons'; /** * Internal dependencies */ - +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -27,3 +27,5 @@ export const settings = { transforms, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/navigation-submenu/init.js b/packages/block-library/src/navigation-submenu/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/navigation-submenu/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/navigation/index.js b/packages/block-library/src/navigation/index.js index fe3b2d555bd2e..c581d5d0bd03a 100644 --- a/packages/block-library/src/navigation/index.js +++ b/packages/block-library/src/navigation/index.js @@ -7,6 +7,7 @@ import { navigation as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -50,3 +51,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/navigation/init.js b/packages/block-library/src/navigation/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/navigation/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/nextpage/index.js b/packages/block-library/src/nextpage/index.js index fabb7349c45e5..5f425e7e952c6 100644 --- a/packages/block-library/src/nextpage/index.js +++ b/packages/block-library/src/nextpage/index.js @@ -6,6 +6,7 @@ import { pageBreak as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import save from './save'; @@ -22,3 +23,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/nextpage/init.js b/packages/block-library/src/nextpage/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/nextpage/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/page-list/index.js b/packages/block-library/src/page-list/index.js index ef026f2e916e9..7e13c23f229f2 100644 --- a/packages/block-library/src/page-list/index.js +++ b/packages/block-library/src/page-list/index.js @@ -6,6 +6,7 @@ import { pages as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit.js'; @@ -18,3 +19,5 @@ export const settings = { example: {}, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/page-list/init.js b/packages/block-library/src/page-list/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/page-list/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/paragraph/index.js b/packages/block-library/src/paragraph/index.js index 40a9db6d131db..70ae87ccf5f36 100644 --- a/packages/block-library/src/paragraph/index.js +++ b/packages/block-library/src/paragraph/index.js @@ -12,6 +12,7 @@ import { paragraph as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -55,3 +56,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/paragraph/init.js b/packages/block-library/src/paragraph/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/paragraph/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/pattern/index.js b/packages/block-library/src/pattern/index.js index 5ab74fdd0c967..e4af712da8bb2 100644 --- a/packages/block-library/src/pattern/index.js +++ b/packages/block-library/src/pattern/index.js @@ -1,6 +1,7 @@ /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import PatternEdit from './edit'; @@ -10,3 +11,5 @@ export { metadata, name }; export const settings = { edit: PatternEdit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/pattern/init.js b/packages/block-library/src/pattern/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/pattern/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-author-biography/index.js b/packages/block-library/src/post-author-biography/index.js index 68fb2c2f737c2..8c91b99f7f6f5 100644 --- a/packages/block-library/src/post-author-biography/index.js +++ b/packages/block-library/src/post-author-biography/index.js @@ -1,13 +1,14 @@ /** - * Internal dependencies + * WordPress dependencies */ -import metadata from './block.json'; -import edit from './edit'; +import { postAuthor as icon } from '@wordpress/icons'; /** - * WordPress dependencies + * Internal dependencies */ -import { postAuthor as icon } from '@wordpress/icons'; +import initBlock from '../utils/init-block'; +import metadata from './block.json'; +import edit from './edit'; const { name } = metadata; export { metadata, name }; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-author-biography/init.js b/packages/block-library/src/post-author-biography/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-author-biography/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-author-name/index.js b/packages/block-library/src/post-author-name/index.js index 34dcccd9acdd0..dce3e48c86f63 100644 --- a/packages/block-library/src/post-author-name/index.js +++ b/packages/block-library/src/post-author-name/index.js @@ -1,15 +1,16 @@ +/** + * WordPress dependencies + */ +import { postAuthor as icon } from '@wordpress/icons'; + /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import transforms from './transforms'; -/** - * WordPress dependencies - */ -import { postAuthor as icon } from '@wordpress/icons'; - const { name } = metadata; export { metadata, name }; @@ -18,3 +19,5 @@ export const settings = { transforms, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-author-name/init.js b/packages/block-library/src/post-author-name/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-author-name/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-author/index.js b/packages/block-library/src/post-author/index.js index 68fb2c2f737c2..8c91b99f7f6f5 100644 --- a/packages/block-library/src/post-author/index.js +++ b/packages/block-library/src/post-author/index.js @@ -1,13 +1,14 @@ /** - * Internal dependencies + * WordPress dependencies */ -import metadata from './block.json'; -import edit from './edit'; +import { postAuthor as icon } from '@wordpress/icons'; /** - * WordPress dependencies + * Internal dependencies */ -import { postAuthor as icon } from '@wordpress/icons'; +import initBlock from '../utils/init-block'; +import metadata from './block.json'; +import edit from './edit'; const { name } = metadata; export { metadata, name }; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-author/init.js b/packages/block-library/src/post-author/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-author/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-comment/index.js b/packages/block-library/src/post-comment/index.js index 3a11344bad652..2fca916307a79 100644 --- a/packages/block-library/src/post-comment/index.js +++ b/packages/block-library/src/post-comment/index.js @@ -6,6 +6,7 @@ import { comment as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -18,3 +19,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-comment/init.js b/packages/block-library/src/post-comment/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-comment/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-comments-count/index.js b/packages/block-library/src/post-comments-count/index.js index cdf53006c224e..1d2525ddf2d9e 100644 --- a/packages/block-library/src/post-comments-count/index.js +++ b/packages/block-library/src/post-comments-count/index.js @@ -6,6 +6,7 @@ import { postCommentsCount as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-comments-count/init.js b/packages/block-library/src/post-comments-count/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-comments-count/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-comments-form/index.js b/packages/block-library/src/post-comments-form/index.js index bcc113faad411..4d0444194241d 100644 --- a/packages/block-library/src/post-comments-form/index.js +++ b/packages/block-library/src/post-comments-form/index.js @@ -6,6 +6,7 @@ import { postCommentsForm as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-comments-form/init.js b/packages/block-library/src/post-comments-form/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-comments-form/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-comments-link/index.js b/packages/block-library/src/post-comments-link/index.js index f79a7ad55adaf..36e9673a08a1d 100644 --- a/packages/block-library/src/post-comments-link/index.js +++ b/packages/block-library/src/post-comments-link/index.js @@ -6,6 +6,7 @@ import { postCommentsCount as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { edit, icon, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-comments-link/init.js b/packages/block-library/src/post-comments-link/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-comments-link/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-comments/index.js b/packages/block-library/src/post-comments/index.js index db109a576b7f9..26e9b4dd75d53 100644 --- a/packages/block-library/src/post-comments/index.js +++ b/packages/block-library/src/post-comments/index.js @@ -6,6 +6,7 @@ import { postComments as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-comments/init.js b/packages/block-library/src/post-comments/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-comments/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-content/index.js b/packages/block-library/src/post-content/index.js index e5025ba5110e0..80196db27878b 100644 --- a/packages/block-library/src/post-content/index.js +++ b/packages/block-library/src/post-content/index.js @@ -6,6 +6,7 @@ import { postContent as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-content/init.js b/packages/block-library/src/post-content/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-content/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-date/index.js b/packages/block-library/src/post-date/index.js index c2384da69192d..fddae539acfa3 100644 --- a/packages/block-library/src/post-date/index.js +++ b/packages/block-library/src/post-date/index.js @@ -6,6 +6,7 @@ import { postDate as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import deprecated from './deprecated'; @@ -18,3 +19,5 @@ export const settings = { edit, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-date/init.js b/packages/block-library/src/post-date/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-date/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-excerpt/index.js b/packages/block-library/src/post-excerpt/index.js index 1f035a7940a6d..41b868965eec5 100644 --- a/packages/block-library/src/post-excerpt/index.js +++ b/packages/block-library/src/post-excerpt/index.js @@ -6,6 +6,7 @@ import { postExcerpt as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import transforms from './transforms'; @@ -18,3 +19,5 @@ export const settings = { transforms, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-excerpt/init.js b/packages/block-library/src/post-excerpt/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-excerpt/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-featured-image/index.js b/packages/block-library/src/post-featured-image/index.js index 3fcab4a081367..aa28444114fb3 100644 --- a/packages/block-library/src/post-featured-image/index.js +++ b/packages/block-library/src/post-featured-image/index.js @@ -6,6 +6,7 @@ import { postFeaturedImage as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-featured-image/init.js b/packages/block-library/src/post-featured-image/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-featured-image/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-navigation-link/index.js b/packages/block-library/src/post-navigation-link/index.js index 5f564739f69d0..e85e594990adb 100644 --- a/packages/block-library/src/post-navigation-link/index.js +++ b/packages/block-library/src/post-navigation-link/index.js @@ -1,6 +1,7 @@ /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import variations from './variations'; @@ -12,3 +13,5 @@ export const settings = { edit, variations, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-navigation-link/init.js b/packages/block-library/src/post-navigation-link/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-navigation-link/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-template/index.js b/packages/block-library/src/post-template/index.js index ace8add51d328..bc6f8ffa13ab6 100644 --- a/packages/block-library/src/post-template/index.js +++ b/packages/block-library/src/post-template/index.js @@ -6,6 +6,7 @@ import { layout } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -18,3 +19,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-template/init.js b/packages/block-library/src/post-template/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-template/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-terms/index.js b/packages/block-library/src/post-terms/index.js index 58390cf91e80f..e68fd9f879f95 100644 --- a/packages/block-library/src/post-terms/index.js +++ b/packages/block-library/src/post-terms/index.js @@ -7,6 +7,7 @@ import { addFilter } from '@wordpress/hooks'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import enhanceVariations from './hooks'; @@ -25,3 +26,5 @@ addFilter( 'core/template-part', enhanceVariations ); + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-terms/init.js b/packages/block-library/src/post-terms/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-terms/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/post-title/index.js b/packages/block-library/src/post-title/index.js index 374a379746df3..86bdab0dbccbf 100644 --- a/packages/block-library/src/post-title/index.js +++ b/packages/block-library/src/post-title/index.js @@ -6,6 +6,7 @@ import { title as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import deprecated from './deprecated'; @@ -18,3 +19,5 @@ export const settings = { edit, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/post-title/init.js b/packages/block-library/src/post-title/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/post-title/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/preformatted/index.js b/packages/block-library/src/preformatted/index.js index 2962464dce423..491acd02bab1d 100644 --- a/packages/block-library/src/preformatted/index.js +++ b/packages/block-library/src/preformatted/index.js @@ -7,6 +7,7 @@ import { preformatted as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import save from './save'; @@ -37,3 +38,5 @@ export const settings = { }; }, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/preformatted/init.js b/packages/block-library/src/preformatted/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/preformatted/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/pullquote/index.js b/packages/block-library/src/pullquote/index.js index d3694b7826940..3d3d47a4b39a1 100644 --- a/packages/block-library/src/pullquote/index.js +++ b/packages/block-library/src/pullquote/index.js @@ -7,6 +7,7 @@ import { pullquote as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -36,3 +37,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/pullquote/init.js b/packages/block-library/src/pullquote/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/pullquote/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/query-no-results/index.js b/packages/block-library/src/query-no-results/index.js index cd0c3209e00a9..1c56638cdfdba 100644 --- a/packages/block-library/src/query-no-results/index.js +++ b/packages/block-library/src/query-no-results/index.js @@ -6,6 +6,7 @@ import { loop as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -18,3 +19,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/query-no-results/init.js b/packages/block-library/src/query-no-results/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/query-no-results/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/query-pagination-next/index.js b/packages/block-library/src/query-pagination-next/index.js index d339ed2ca7581..2df0e8da6aa99 100644 --- a/packages/block-library/src/query-pagination-next/index.js +++ b/packages/block-library/src/query-pagination-next/index.js @@ -6,6 +6,7 @@ import { queryPaginationNext as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/query-pagination-next/init.js b/packages/block-library/src/query-pagination-next/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/query-pagination-next/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/query-pagination-numbers/index.js b/packages/block-library/src/query-pagination-numbers/index.js index 9f1818b1f14a0..3fd903e2d9ef4 100644 --- a/packages/block-library/src/query-pagination-numbers/index.js +++ b/packages/block-library/src/query-pagination-numbers/index.js @@ -6,6 +6,7 @@ import { queryPaginationNumbers as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/query-pagination-numbers/init.js b/packages/block-library/src/query-pagination-numbers/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/query-pagination-numbers/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/query-pagination-previous/index.js b/packages/block-library/src/query-pagination-previous/index.js index a66be07616944..80e555ccc79d9 100644 --- a/packages/block-library/src/query-pagination-previous/index.js +++ b/packages/block-library/src/query-pagination-previous/index.js @@ -6,6 +6,7 @@ import { queryPaginationPrevious as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/query-pagination-previous/init.js b/packages/block-library/src/query-pagination-previous/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/query-pagination-previous/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/query-pagination/index.js b/packages/block-library/src/query-pagination/index.js index 05124f3321b67..b113a8384b043 100644 --- a/packages/block-library/src/query-pagination/index.js +++ b/packages/block-library/src/query-pagination/index.js @@ -6,6 +6,7 @@ import { queryPagination as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -20,3 +21,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/query-pagination/init.js b/packages/block-library/src/query-pagination/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/query-pagination/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/query-title/index.js b/packages/block-library/src/query-title/index.js index 236a7c5898a58..875c2b8b86504 100644 --- a/packages/block-library/src/query-title/index.js +++ b/packages/block-library/src/query-title/index.js @@ -1,16 +1,17 @@ +/** + * WordPress dependencies + */ +import { title as icon } from '@wordpress/icons'; + /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import variations from './variations'; import deprecated from './deprecated'; -/** - * WordPress dependencies - */ -import { title as icon } from '@wordpress/icons'; - const { name } = metadata; export { metadata, name }; @@ -20,3 +21,5 @@ export const settings = { variations, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/query-title/init.js b/packages/block-library/src/query-title/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/query-title/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/query/index.js b/packages/block-library/src/query/index.js index 4a87004087997..8545e4796d3ba 100644 --- a/packages/block-library/src/query/index.js +++ b/packages/block-library/src/query/index.js @@ -7,6 +7,7 @@ import { addFilter } from '@wordpress/hooks'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import save from './save'; @@ -28,3 +29,5 @@ export const settings = { // Importing this file includes side effects and is added // in block-library/package.json under `sideEffects`. addFilter( 'editor.BlockEdit', 'core/query', queryInspectorControls ); + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/query/init.js b/packages/block-library/src/query/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/query/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/quote/index.js b/packages/block-library/src/quote/index.js index 8140ad49f3495..d67685f3561b0 100644 --- a/packages/block-library/src/quote/index.js +++ b/packages/block-library/src/quote/index.js @@ -7,6 +7,7 @@ import { quote as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -37,3 +38,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/quote/init.js b/packages/block-library/src/quote/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/quote/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/read-more/index.js b/packages/block-library/src/read-more/index.js index e463830969348..497cd77f429e6 100644 --- a/packages/block-library/src/read-more/index.js +++ b/packages/block-library/src/read-more/index.js @@ -6,6 +6,7 @@ import { link as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/read-more/init.js b/packages/block-library/src/read-more/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/read-more/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/rss/index.js b/packages/block-library/src/rss/index.js index f0c4c3c3789bf..439d14c4edcdd 100644 --- a/packages/block-library/src/rss/index.js +++ b/packages/block-library/src/rss/index.js @@ -6,6 +6,7 @@ import { rss as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -22,3 +23,5 @@ export const settings = { }, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/rss/init.js b/packages/block-library/src/rss/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/rss/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/search/index.js b/packages/block-library/src/search/index.js index 7e946636c5048..441336316415b 100644 --- a/packages/block-library/src/search/index.js +++ b/packages/block-library/src/search/index.js @@ -6,6 +6,7 @@ import { search as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import variations from './variations'; @@ -20,3 +21,5 @@ export const settings = { variations, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/search/init.js b/packages/block-library/src/search/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/search/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/separator/index.js b/packages/block-library/src/separator/index.js index 4a73823a81224..712caef775146 100644 --- a/packages/block-library/src/separator/index.js +++ b/packages/block-library/src/separator/index.js @@ -6,6 +6,7 @@ import { separator as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import save from './save'; @@ -29,3 +30,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/separator/init.js b/packages/block-library/src/separator/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/separator/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/shortcode/index.js b/packages/block-library/src/shortcode/index.js index 37749dbfa7365..6fe36bdbfb3d3 100644 --- a/packages/block-library/src/shortcode/index.js +++ b/packages/block-library/src/shortcode/index.js @@ -6,6 +6,7 @@ import { shortcode as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import save from './save'; import transforms from './transforms'; @@ -21,3 +22,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/shortcode/init.js b/packages/block-library/src/shortcode/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/shortcode/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/site-logo/index.js b/packages/block-library/src/site-logo/index.js index d5e652d958057..68d8eb6f8b930 100644 --- a/packages/block-library/src/site-logo/index.js +++ b/packages/block-library/src/site-logo/index.js @@ -6,6 +6,7 @@ import { siteLogo as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import transforms from './transforms'; @@ -18,3 +19,5 @@ export const settings = { edit, transforms, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/site-logo/init.js b/packages/block-library/src/site-logo/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/site-logo/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/site-tagline/index.js b/packages/block-library/src/site-tagline/index.js index 89477ca98f643..1d0090f9dcea1 100644 --- a/packages/block-library/src/site-tagline/index.js +++ b/packages/block-library/src/site-tagline/index.js @@ -1,6 +1,7 @@ /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import icon from './icon'; @@ -14,3 +15,5 @@ export const settings = { edit, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/site-tagline/init.js b/packages/block-library/src/site-tagline/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/site-tagline/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/site-title/index.js b/packages/block-library/src/site-title/index.js index 2c38d37390a76..01fe15598d6f1 100644 --- a/packages/block-library/src/site-title/index.js +++ b/packages/block-library/src/site-title/index.js @@ -6,6 +6,7 @@ import { mapMarker as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import deprecated from './deprecated'; @@ -20,3 +21,5 @@ export const settings = { transforms, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/site-title/init.js b/packages/block-library/src/site-title/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/site-title/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/social-link/index.js b/packages/block-library/src/social-link/index.js index 2944183dc4089..161e6f2697acc 100644 --- a/packages/block-library/src/social-link/index.js +++ b/packages/block-library/src/social-link/index.js @@ -6,6 +6,7 @@ import { share as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import variations from './variations'; @@ -19,3 +20,5 @@ export const settings = { edit, variations, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/social-link/init.js b/packages/block-library/src/social-link/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/social-link/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/social-links/index.js b/packages/block-library/src/social-links/index.js index b323624b2b5b6..601a8c63ec539 100644 --- a/packages/block-library/src/social-links/index.js +++ b/packages/block-library/src/social-links/index.js @@ -6,6 +6,7 @@ import { share as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -46,3 +47,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/social-links/init.js b/packages/block-library/src/social-links/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/social-links/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/spacer/index.js b/packages/block-library/src/spacer/index.js index 4b71001cefad8..d77c51bc96cea 100644 --- a/packages/block-library/src/spacer/index.js +++ b/packages/block-library/src/spacer/index.js @@ -6,6 +6,7 @@ import { resizeCornerNE as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -21,3 +22,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/spacer/init.js b/packages/block-library/src/spacer/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/spacer/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/table-of-contents/index.js b/packages/block-library/src/table-of-contents/index.js index 62bb5e89953a1..8952f0ff381bb 100644 --- a/packages/block-library/src/table-of-contents/index.js +++ b/packages/block-library/src/table-of-contents/index.js @@ -1,6 +1,7 @@ /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import icon from './icon'; @@ -15,3 +16,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/table-of-contents/init.js b/packages/block-library/src/table-of-contents/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/table-of-contents/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/table/index.js b/packages/block-library/src/table/index.js index cfa7bb0b02aa6..5839abc4c19f2 100644 --- a/packages/block-library/src/table/index.js +++ b/packages/block-library/src/table/index.js @@ -7,6 +7,7 @@ import { blockTable as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -96,3 +97,5 @@ export const settings = { save, deprecated, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/table/init.js b/packages/block-library/src/table/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/table/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/tag-cloud/index.js b/packages/block-library/src/tag-cloud/index.js index 503dcb934ecc3..6dc0931663fcd 100644 --- a/packages/block-library/src/tag-cloud/index.js +++ b/packages/block-library/src/tag-cloud/index.js @@ -6,6 +6,7 @@ import { tag as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import transforms from './transforms'; import metadata from './block.json'; import edit from './edit'; @@ -20,3 +21,5 @@ export const settings = { edit, transforms, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/tag-cloud/init.js b/packages/block-library/src/tag-cloud/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/tag-cloud/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/template-part/index.js b/packages/block-library/src/template-part/index.js index 6fe7cf1cad855..063aa596375bd 100644 --- a/packages/block-library/src/template-part/index.js +++ b/packages/block-library/src/template-part/index.js @@ -15,6 +15,7 @@ import { decodeEntities } from '@wordpress/html-entities'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; import { enhanceTemplatePartVariations } from './variations'; @@ -81,3 +82,5 @@ addFilter( return true; } ); + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/template-part/init.js b/packages/block-library/src/template-part/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/template-part/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/term-description/index.js b/packages/block-library/src/term-description/index.js index 76670d556d075..0ff710a91f5d5 100644 --- a/packages/block-library/src/term-description/index.js +++ b/packages/block-library/src/term-description/index.js @@ -6,6 +6,7 @@ import { termDescription as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import metadata from './block.json'; import edit from './edit'; @@ -16,3 +17,5 @@ export const settings = { icon, edit, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/term-description/init.js b/packages/block-library/src/term-description/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/term-description/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/text-columns/index.js b/packages/block-library/src/text-columns/index.js index 29c11a7c05bb4..c0bce35b96f4e 100644 --- a/packages/block-library/src/text-columns/index.js +++ b/packages/block-library/src/text-columns/index.js @@ -1,6 +1,7 @@ /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import save from './save'; @@ -21,3 +22,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/text-columns/init.js b/packages/block-library/src/text-columns/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/text-columns/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/verse/index.js b/packages/block-library/src/verse/index.js index a880300e8793a..6cf8b9b9fb9e4 100644 --- a/packages/block-library/src/verse/index.js +++ b/packages/block-library/src/verse/index.js @@ -7,6 +7,7 @@ import { verse as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import deprecated from './deprecated'; import edit from './edit'; import metadata from './block.json'; @@ -39,3 +40,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/verse/init.js b/packages/block-library/src/verse/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/verse/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init(); diff --git a/packages/block-library/src/video/index.js b/packages/block-library/src/video/index.js index 029df51c5ebab..688d5ca944f84 100644 --- a/packages/block-library/src/video/index.js +++ b/packages/block-library/src/video/index.js @@ -7,6 +7,7 @@ import { video as icon } from '@wordpress/icons'; /** * Internal dependencies */ +import initBlock from '../utils/init-block'; import edit from './edit'; import metadata from './block.json'; import save from './save'; @@ -29,3 +30,5 @@ export const settings = { edit, save, }; + +export const init = () => initBlock( { name, metadata, settings } ); diff --git a/packages/block-library/src/video/init.js b/packages/block-library/src/video/init.js new file mode 100644 index 0000000000000..79f0492c2cb2f --- /dev/null +++ b/packages/block-library/src/video/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init();