npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@widilo/widilo-gutenberg-boilerplate

v1.0.5

Published

Gutenberg Blocks Boilerplate Plugin

Downloads

4

Readme

widilo® Gutenberg Boilerplate (widilo-gutenberg-boilerplate)

A boilerplate for the time-saving creation of WordPress Gutenberg Blocks or plugins for the Gutenberg Block Editor.

Installation:

  1. Login to your WP installation via SSH/Terminal
  2. Switch to the WP plugin directory (wp-content/plugins)
  3. Install our boilerplate plugin using the following command: npm i @widilo/widilo-gutenberg-boilerplate
  4. After installation you can activate the boilerplate plugin in your WordPress backend or via WP-CLI.

With widilo-gutenberg-boilerplate you can add Gutenberg blocks, custom fields and other functionalities to the Gutenberg editor or your WordPress site very quickly, effectively and easily.

Usage

All gutenberg blocks are organized in the plugins folder wp-content/plugins/widilo-gutenberg-boilerplate/blocks. Inside the blocks folder you can create individual folders and files for every block you want to add.

As an example we have created a block called widilo Boilerplate Block -> widilo-gutenberg-boilerplate/blocks/boilerplate-block/boilerplate_block.js.

Feel free to change the widilo Boilerplate Block to your needs. Therefore open boilerplate_block.js -> widilo-gutenberg-boilerplate/blocks/boilerplate-block/boilerplate-block.js.

You can change the title of your block, the block icon, the category and the block content as you wish.

After you have finished your changes, run npm run dev in the plugin folder to make the magic happen.

boilerplate_block.js:

const { __ } = wp.i18n; 
const { registerBlockType } = wp.blocks; 

registerBlockType( 'widilo-gutenberg-boilerplate/block-boilerplate-block', {

    title: __( 'widilo Boilerplate Block', 'widilo_gutenberg_boilerplate' ), 
    icon: 'marker', 
    category: 'common', 
    keywords: [
        __( 'widilo Boilerplate Block', 'widilo_gutenberg_boilerplate' ),
        __( 'boilerplate-block', 'widilo_gutenberg_boilerplate' ),
    ],

    edit: function( props ) {
        return (
            <div className={ props.className }>
                <p>{ __(`This is an example Gutenberg Block. Feel free to change it to your needs. Therefore open your plugins folder -> widilo-gutenberg-boilerplate -> blocks -> boilerplate-block -> boilerplate-block.js. You can change the title of your block, the block icon, the category and the block content as you wish. After you have finished your changes, run 'npm run dev' in the plugin folder to make the magic happen.`, 'widilo_gutenberg_boilerplate') }</p>
            </div>
        );
    },

    save: function( props ) {
        return (
            <div>
                <p>{ __(`This is an example Gutenberg Block. Feel free to change it to your needs. Therefore open your plugins folder -> widilo-gutenberg-boilerplate -> blocks -> boilerplate-block -> boilerplate-block.js. You can change the title of your block, the block icon, the category and the block content as you wish. After you have finished your changes, run 'npm run dev' in the plugin folder to make the magic happen.`, 'widilo_gutenberg_boilerplate') }</p>
            </div>
        );
    },
} );

If you want to create your own block you can simply make a copy of the boilerplate-block folder. Please make sure to change the name of the folder and the name of the js file inside your new, renamed block folder after copying.

npm

https://www.npmjs.com/package/@widilo/widilo-gutenberg-boilerplate

What's next?

We will add additional block examples in next version : )

Changelog:

1.0.0

1.0.1

  • Update README.md

1.0.2

  • Update README.md
  • Update "devDependencies" in package.json
  • Add license.txt

License

GPL v.3

widilo® Gutenberg Boilerplate (widilo-gutenberg-boilerplate) Copyright (C) 2022 widilo® Muennecke & Vollmers GbR