Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@ryanwelcher/dynamic-block-template

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ryanwelcher/dynamic-block-template

A template for use with @wordpress/create-block to support dynamic blocks

Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
1
-91.67%
Maintainers
1
Weekly downloads
 
Created
Source

Dynamic Block Template

This template will scaffold a plugin that is set up for registering dynamic block using the @wordpress/create-block tool.

It also provides integration with the @wordpress/env package for a local development solution.

Usage

Run the following in the terminal of your choice:

npx @wordpress/create-block example-plugin --template @ryanwelcher/dynamic-block-template

The name of the plugin ( example-plugin in the example above) is used as both the name of the plugin and the name of the block being created. This is due to the current @wordpress/create-block tool expecting a single block per plugin.

Structure

Once the command has completed, the following structure will be created:

- build
- src
--> {example-block}
---> block.json
---> edit.js
---> editor.scss
---> index.js
---> style.scss
.editorconfig
.eslintrc
.gitignore
.wp-env.json
{example-block}.php
package.json
package-lock.json

@wordpress/env setup

In order to use the @wordpress/env, you will need to add "env": "wp-env" to the scripts in package.json. Please refer to the @wordpress/env docs for details on requirements and usage.

Keywords

wordpress

FAQs

Package last updated on 14 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts