This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

prettier-plugin-liquidsoap

1.4.4 • Public • Published

Liquidsoap prettier

This package provides a Prettier plugin for liquidsoap code as well as a liquidsoap-prettier binary for formatting liquidsoap scripts.

Installation

liquidsoap-prettier

The liquidsoap-prettier command-line utility should be installed with this package and should be available following the usual node package binary conventions.

It works as follows:

$ liquidsoap-prettier [-w|--write] /path/to/file.liq

Local prettier plugin

In general, prettier works better when installed locally but this requires a package.json at the root of your project.

First, install prettier-plugin-liquidsoap as a dev-dependency:

npm install -D prettier prettier-plugin-liquidsoap

Then add the plugin to your Prettier config:

// .prettierrc
{
  "plugins": ["prettier-plugin-liquidsoap"]
}

Global prettier plugin

Installing the plugin globally works but currently requires a couple of workarounds. You need to install the plugin and the prettier module globally:

% npm install -g prettier prettier-plugin-liquidsoap

Next, you need to create a prettier configuration file in your home directory. This file must reference the absolute path to the plugin entrypoint:

// $HOME/.prettierrc
{
  "plugins": ["/path/to/prettier-plugin-liquidsoap/src/index.js"],
  "overrides": [
    {
      "files": "*.liq",
      "options": {
        "parser": "liquidsoap"
      }
    }
  ]
}

To find out the absolute path to the plugin entrypoint you can do:

% which prettier
<prefix>/bin/prettier

The plugin should then be located at: <prefix>/lib/node_modules/prettier-plugin-liquidsoap/src/index.js

Readme

Keywords

none

Package Sidebar

Install

npm i prettier-plugin-liquidsoap

Weekly Downloads

1

Version

1.4.4

License

ISC

Unpacked Size

19.6 MB

Total Files

14

Last publish

Collaborators

  • toots