JSPM

prettier-plugin-blade-volt

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q21262F
  • License MIT

A Prettier plugin for formatting Blade files with support for Laravel Livewire Volt

Package Exports

  • prettier-plugin-blade-volt
  • prettier-plugin-blade-volt/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (prettier-plugin-blade-volt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Prettier PHP

Prettier Blade Plugin

GitHub Workflow Status npm version

This plugin has been https://github.com/shufo/prettier-plugin-blade extended for use with Livewire Volt.

The original functionality is retained, with the addition of the option addPrettierIgnoreForVolt.

By setting this option to true, the <?php start tag and the closing tag ? > before and after <! -- prettier-ignore-start --> and <! -- prettier-ignore-end --> before and after the closing tag `? This allows you to exclude prettier formatting between php tags in the blade.

Installation

npm install --save-dev @nxsdev/rettier-plugin-blade-volt

# yarn
yarn add -D @nxsdev/rettier-plugin-blade-volt

# pnpm
pnpm add -D @nxsdev/rettier-plugin-blade-volt

then, add in your Prettier configuration:

{
  "plugins": ["@nxsdev/prettier-plugin-blade-volt"],
  "overrides": [
    {
      "files": ["*.blade.php"],
      "options": {
        "parser": "blade",
        "tabWidth": 4,
        "addPrettierIgnoreForVolt": true
      }
    }
  ]
}

Since the rest is basically the same, please refer to this GitHub.

https://github.com/shufo/prettier-plugin-blade