diff --git a/packages/block-library/package.json b/packages/block-library/package.json index 9dbca1ea7b85a6..0871b15394ffbb 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 e1f01f30a71874..40844eb9cb7d7a 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 c1fb9560b48eeb..79f0492c2cb2f8 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 d3047dd5af4455..0d3d05936ef90f 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 00000000000000..79f0492c2cb2f8 --- /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 ef71f2751459a0..d318450aec3903 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 00000000000000..79f0492c2cb2f8 --- /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 fff0109a543acc..95e090f0afd6ad 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 00000000000000..79f0492c2cb2f8 --- /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 c454e46bf681bf..2b05b280028abd 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 00000000000000..79f0492c2cb2f8 --- /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 52d406e0ca976c..810922fbcb839b 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 00000000000000..79f0492c2cb2f8 --- /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 a8fed300b171ec..7fff20826e2719 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 00000000000000..79f0492c2cb2f8 --- /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 9698dacfdaff31..8cdcad450862a2 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 00000000000000..79f0492c2cb2f8 --- /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 8301b13d9ff573..08e2fffaf54807 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 00000000000000..79f0492c2cb2f8 --- /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 e935e682f45caa..687b8c180b1f50 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 00000000000000..79f0492c2cb2f8 --- /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 d5185f0ee368af..45f7bd70e61ffd 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 00000000000000..79f0492c2cb2f8 --- /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 ef71f2751459a0..d318450aec3903 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 00000000000000..79f0492c2cb2f8 --- /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 d1481d359b0a08..4d85bbebe047be 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 00000000000000..79f0492c2cb2f8 --- /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 6020aab70e0f88..130f1d30125559 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 00000000000000..79f0492c2cb2f8 --- /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 c2384da69192d9..fddae539acfa34 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 00000000000000..79f0492c2cb2f8 --- /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 8e1ee77e388b49..6639dda86a7a40 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 00000000000000..79f0492c2cb2f8 --- /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 491c0ca7d95e14..c04f8ce7b1bba5 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 00000000000000..79f0492c2cb2f8 --- /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 b6e6d280626bfb..afc295cad4c126 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 00000000000000..79f0492c2cb2f8 --- /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 d339ed2ca7581c..2df0e8da6aa99d 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 00000000000000..79f0492c2cb2f8 --- /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 9f1818b1f14a0f..3fd903e2d9ef48 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 00000000000000..79f0492c2cb2f8 --- /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 a66be076169442..80e555ccc79d9b 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 00000000000000..79f0492c2cb2f8 --- /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 a15bdd4389cee5..3d9bc853db140c 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 00000000000000..79f0492c2cb2f8 --- /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 374a379746df3a..86bdab0dbccbff 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 00000000000000..79f0492c2cb2f8 --- /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 9cecb54f5a64dc..21db8b986d6e5e 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 00000000000000..79f0492c2cb2f8 --- /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 89576d2ae55e18..45d91ab1e5c414 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 00000000000000..79f0492c2cb2f8 --- /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 5f0e38c1aabf25..065cf9665fa9b0 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 00000000000000..79f0492c2cb2f8 --- /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 bf2b6a6b918f1d..46b9691ea88a7a 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 00000000000000..79f0492c2cb2f8 --- /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 b4d7cf715442b8..e94a459487b898 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 00000000000000..79f0492c2cb2f8 --- /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 c9b82278a507a2..f865072526098b 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 00000000000000..79f0492c2cb2f8 --- /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 ddee42e095f7a0..2d06f1a965c521 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 00000000000000..79f0492c2cb2f8 --- /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 e829a7ae15108e..56bf1f670e92db 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 00000000000000..79f0492c2cb2f8 --- /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 5bb3914bb1bf33..71d62dcd8c44e5 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 00000000000000..79f0492c2cb2f8 --- /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 cb1fb915ee8b5a..cd25f25126a61d 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 00000000000000..79f0492c2cb2f8 --- /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 dcdbd4e76882c1..1477fa99c702c5 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 00000000000000..79f0492c2cb2f8 --- /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 6497e8b5b927d6..5c2bab45638df7 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 00000000000000..79f0492c2cb2f8 --- /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 a0f8ffa74898b2..5ea877488d72a7 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 00000000000000..79f0492c2cb2f8 --- /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 480f811c85c1e7..61756019baf920 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 00000000000000..79f0492c2cb2f8 --- /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 bef6b6558df898..93674e13587af8 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 00000000000000..79f0492c2cb2f8 --- /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 4f91f96242217e..65c611621fd623 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 00000000000000..79f0492c2cb2f8 --- /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 3b7bf4b889ee99..373050cb77fd56 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 00000000000000..79f0492c2cb2f8 --- /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 97db4e5c09b699..766381156eb34f 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 00000000000000..79f0492c2cb2f8 --- /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 efe76cf07a17f4..4c1fad3cb67f48 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 00000000000000..79f0492c2cb2f8 --- /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 04389ffb7d10df..795f38b451d6fd 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 00000000000000..79f0492c2cb2f8 --- /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 9d270e3c9e0032..c14ae6096fc9f8 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 00000000000000..79f0492c2cb2f8 --- /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 fe3b2d555bd2ec..c581d5d0bd03a0 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 00000000000000..79f0492c2cb2f8 --- /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 fabb7349c45e5a..5f425e7e952c62 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 00000000000000..79f0492c2cb2f8 --- /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 ef026f2e916e98..7e13c23f229f2e 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 00000000000000..79f0492c2cb2f8 --- /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 40a9db6d131db3..70ae87ccf5f36c 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 00000000000000..79f0492c2cb2f8 --- /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 5ab74fdd0c967a..e4af712da8bb29 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 00000000000000..79f0492c2cb2f8 --- /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 68fb2c2f737c25..8c91b99f7f6f59 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 00000000000000..79f0492c2cb2f8 --- /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 34dcccd9acdd02..dce3e48c86f636 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 00000000000000..79f0492c2cb2f8 --- /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 68fb2c2f737c25..8c91b99f7f6f59 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 00000000000000..79f0492c2cb2f8 --- /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 3a11344bad652e..2fca916307a791 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 00000000000000..79f0492c2cb2f8 --- /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 cdf53006c224eb..1d2525ddf2d9eb 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 00000000000000..79f0492c2cb2f8 --- /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 bcc113faad411a..4d0444194241de 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 00000000000000..79f0492c2cb2f8 --- /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 f79a7ad55adaf3..36e9673a08a1d2 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 00000000000000..79f0492c2cb2f8 --- /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 db109a576b7f93..26e9b4dd75d539 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 00000000000000..79f0492c2cb2f8 --- /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 e5025ba5110e0f..80196db27878bc 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 00000000000000..79f0492c2cb2f8 --- /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 c2384da69192d9..fddae539acfa34 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 00000000000000..79f0492c2cb2f8 --- /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 1f035a7940a6dd..41b868965eec57 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 00000000000000..79f0492c2cb2f8 --- /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 3fcab4a0813675..aa28444114fb36 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 00000000000000..79f0492c2cb2f8 --- /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 5f564739f69d0a..e85e594990adba 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 00000000000000..79f0492c2cb2f8 --- /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 ace8add51d3289..bc6f8ffa13ab60 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 00000000000000..79f0492c2cb2f8 --- /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 58390cf91e80fc..e68fd9f879f95c 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 00000000000000..79f0492c2cb2f8 --- /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 374a379746df3a..86bdab0dbccbff 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 00000000000000..79f0492c2cb2f8 --- /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 2962464dce4238..491acd02bab1db 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 00000000000000..79f0492c2cb2f8 --- /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 d3694b7826940d..3d3d47a4b39a1f 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 00000000000000..79f0492c2cb2f8 --- /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 cd0c3209e00a9f..1c56638cdfdba8 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 00000000000000..79f0492c2cb2f8 --- /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 d339ed2ca7581c..2df0e8da6aa99d 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 00000000000000..79f0492c2cb2f8 --- /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 9f1818b1f14a0f..3fd903e2d9ef48 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 00000000000000..79f0492c2cb2f8 --- /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 a66be076169442..80e555ccc79d9b 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 00000000000000..79f0492c2cb2f8 --- /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 05124f3321b67b..b113a8384b043b 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 00000000000000..79f0492c2cb2f8 --- /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 236a7c5898a582..875c2b8b865041 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 00000000000000..79f0492c2cb2f8 --- /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 4a87004087997e..8545e4796d3ba4 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 00000000000000..79f0492c2cb2f8 --- /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 8140ad49f34958..d67685f3561b01 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 00000000000000..79f0492c2cb2f8 --- /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 e4638309693480..497cd77f429e62 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 00000000000000..79f0492c2cb2f8 --- /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 f0c4c3c3789bf2..439d14c4edcdd6 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 00000000000000..79f0492c2cb2f8 --- /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 7e946636c5048c..441336316415b9 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 00000000000000..79f0492c2cb2f8 --- /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 4a73823a812247..712caef7751463 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 00000000000000..79f0492c2cb2f8 --- /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 37749dbfa73650..6fe36bdbfb3d3f 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 00000000000000..79f0492c2cb2f8 --- /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 d5e652d9580576..68d8eb6f8b9300 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 00000000000000..79f0492c2cb2f8 --- /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 89477ca98f6436..1d0090f9dcea19 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 00000000000000..79f0492c2cb2f8 --- /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 2c38d37390a76a..01fe15598d6f1b 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 00000000000000..79f0492c2cb2f8 --- /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 2944183dc4089a..161e6f2697acca 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 00000000000000..79f0492c2cb2f8 --- /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 b323624b2b5b67..601a8c63ec5399 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 00000000000000..79f0492c2cb2f8 --- /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 4b71001cefad8d..d77c51bc96cea2 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 00000000000000..79f0492c2cb2f8 --- /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 62bb5e89953a1d..8952f0ff381bb4 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 00000000000000..79f0492c2cb2f8 --- /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 cfa7bb0b02aa64..5839abc4c19f25 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 00000000000000..79f0492c2cb2f8 --- /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 503dcb934ecc31..6dc0931663fcd7 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 00000000000000..79f0492c2cb2f8 --- /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 6fe7cf1cad855b..063aa596375bdd 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 00000000000000..79f0492c2cb2f8 --- /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 76670d556d075b..0ff710a91f5d50 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 00000000000000..79f0492c2cb2f8 --- /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 29c11a7c05bb43..c0bce35b96f4ef 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 00000000000000..79f0492c2cb2f8 --- /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 a880300e8793a8..6cf8b9b9fb9e4d 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 00000000000000..79f0492c2cb2f8 --- /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 029df51c5ebabe..688d5ca944f846 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 00000000000000..79f0492c2cb2f8 --- /dev/null +++ b/packages/block-library/src/video/init.js @@ -0,0 +1,6 @@ +/** + * Internal dependencies + */ +import { init } from './'; + +export default init();