Socket
Socket
Sign inDemoInstall

laravel-mix-wp-blocks

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    laravel-mix-wp-blocks

Laravel mix extension to transpile WordPress blocks.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
2.13 kB
Created
Weekly downloads
 

Changelog

Source

0.2.0 July 10th, 2019

Changed

  • Replaced custom webpack externals with mainline @wordpress/dependency-extraction-webpack-plugin.

Readme

Source

Laravel Mix WP Blocks

About

Laravel mix extension to transpile WordPress blocks.

npm install laravel-mix-wp-blocks --save-dev yarn add -D laravel-mix-wp-blocks

Usage

require("laravel-mix-wp-blocks")

mix.block('resources/assets/scripts/blocks.js', 'scripts')

Now you have access to all dependencies using @wordpress package import syntax. Example:

import { RichText } from '@wordpress/block-editor'

You will also find a json file accompanying each script (in your dist dir) containing all the @wordpress dependencies utilized by that script.

You can use that JSON file when enqueing your block in PHP to make sure your declared dependencies always match up with your actual usage.

Keywords

FAQs

Last updated on 10 Jul 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc