Socket
Book a DemoInstallSign in
Socket

@ryanwelcher/build-all-the-things

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ryanwelcher/build-all-the-things

A template that sets up support for building multiple blocks and separate JavaScript to registers variations and slots

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
0
Created
Source

Build all the things!

This create-block template provides a starting point for a WordPress plugin that can support multiple block along with standalone scripts for slots and variations. It is easily extendable.

It shows how to customize the wp-scripts build process both via flags and a custom webpack. Additionally, it has full support for building multiple blocks and uses the new caching mechanism introduced in WordPress 6.7 to load blocks even faster.

Usage

npx @wordpress/create-block --template @ryanwelcher/build-all-the-things

Variants

  • dynamic - Generates a dynamic block. This is the default variant
  • static - scaffolds the completed files for the tutorial

Structure

- build
- js
--> slots.js
--> variations.js
- blocks
--> {block-slug}
---> block.json
---> edit.js
---> editor.scss
---> index.js
---> style.scss
---> render.php
---> view.js
.editorconfig
.eslintrc
.gitignore
{block-slug}.php
package.json
package-lock.json
webpack.config.js

Keywords

wordpress

FAQs

Package last updated on 03 Dec 2024

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