Skip to content

Commit

Permalink
Adjust the docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel committed Apr 28, 2022
1 parent c7d969a commit 9cb8fb8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/block-library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ _Parameters_

- _blocks_ `Array`: An optional array of the core blocks being registered.


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

## Contributing to this package
Expand Down
6 changes: 4 additions & 2 deletions packages/block-library/babel-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const isBlockMetadataExperimental = require( './src/is-block-metadata-experiment
const BLOCK_LIBRARY_INDEX_PATH = 'block-library/src/index.js';

/**
* Babel plugin that transforms the references to experimental blocks imported in
* BLOCK_LIBRARY_INDEX_PATH to conditional expressions.
* Babel plugin that wraps the references to experimental blocks imported in
* BLOCK_LIBRARY_INDEX_PATH in conditional expressions.
*
* For example:
* myExperimentalBlock,
Expand All @@ -22,6 +22,8 @@ const BLOCK_LIBRARY_INDEX_PATH = 'block-library/src/index.js';
* This ensures the dead code elimination removes the experimental blocks modules
* during the production build.
*
* For more context, see https://github.com/WordPress/gutenberg/pull/40655/
*
* @param {import('@babel/core')} babel Current Babel object.
*
* @return {import('@babel/core').PluginObj} Babel plugin object.
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/is-block-metadata-experimental.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* from block.json.
*
* This function is in a separate file and uses the older JS syntax so
* that it can be used in both:
* * block-library/src/index.js
* * block-library/src/is-block-metadata-experimental.js
* that it can be imported in both:
* block-library/src/index.js
* block-library/src/babel-plugin.js
*
* @param {Object} metadata Parsed block.json metadata.
* @return {boolean} Is the block experimental?
Expand Down

0 comments on commit 9cb8fb8

Please sign in to comment.