Thursday, December 8, 2022
HomeWordPress DevelopmentBlock growth: how one can bump model on generated css recordsdata?

Block growth: how one can bump model on generated css recordsdata?


I’m constructing my first Gutenberg customized block, on WordPress 6.1.1, utilizing the @wordpress/create-block scaffolding. I’ve constructed and deployed my first toy block, and that labored okay.

Now as I’m growing, I’ve made modifications to the type recordsdata (editor.scss and elegance.scss), and I can see that the right css recordsdata had been generated within the construct listing. Nevertheless, the plugin is enqueuing these with model 0.1.0, and in consequence I am getting the identical toy model of the recordsdata that I began with. I cleared my browser historical past, however that did not assist, in all probability as a result of my web site is behind a firewall–I’m guessing the firewall is caching as effectively.

I suppose I can go determine how one can inform the firewall to cease it, but it surely additionally appears to me that I ought to be capable to bump the model quantity on the generated css recordsdata. Does anyone know the way to do this? Beneath is the contents of the top-level plugin PHP file, which as you may see does the enqueuing internally, the place I can not get at it:

<?php
/**
 * Plugin Identify:       Cblock
 * Description:       Instance block scaffolded with Create Block device.
 * Requires at the very least: 6.1
 * Requires PHP:      7.0
 * Model:           0.1.0
 * Creator:            The WordPress Contributors
 * License:           GPL-2.0-or-later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Textual content Area:       cblock
 *
 * @bundle           create-block
 */

/**
 * Registers the block utilizing the metadata loaded from the `block.json` file.
 * Behind the scenes, it registers additionally all property to allow them to be enqueued
 * by the block editor within the corresponding context.
 *
 * @see https://developer.wordpress.org/reference/capabilities/register_block_type/
 */
operate create_block_cblock_block_init() {
    register_block_type( __DIR__ . '/construct' );
}
add_action( 'init', 'create_block_cblock_block_init' );

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments