0.2.1 • Published 6 months ago

prettier-plugin-wp-block-html v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

prettier-plugin-wp-block-html

A Prettier plugin for HTML in WordPress Block Theme.

This plugin formats unique HTML code including Block markups in the WordPress block theme.

⚠️ Warning

This plugin is currently in beta. It may return unexpected results.

Usage

In most cases, you can just install prettier-plugin-wp-block-html and start using it. The plugin will work automatically after installation.

npm install -D prettier prettier-plugin-wp-block-html

If the plugin cannot be found automatically, you can load it as follows:

// prettier.config.js
module.exports = {
  plugins: ["prettier-plugin-wp-block-html"],
};

Alternatively:

npx prettier --write ./parts/header.html --plugin prettier-plugin-wp-block-html

For more information, please refer to Prettier documentation.

Using with other Prettier plugins

This plugin uses specific Prettier APIs, which may conflict with other plugins that use similar APIs.

To avoid this problem, consider the order of the plugins in the Prettier configuration file. Now you can use this plugin with prettier-plugin-tailwindcss.

// .prettierrc.json
{
  "plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-wp-block-html"]
}
0.2.1

6 months ago

0.2.0

6 months ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago