1.4.4 • Published 7 months ago

prettier-plugin-liquidsoap v1.4.4

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

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

1.3.7

7 months ago

1.3.6

7 months ago

1.4.4

7 months ago

1.3.5

7 months ago

1.4.3

7 months ago

1.3.4

7 months ago

1.4.2

7 months ago

1.3.3

7 months ago

1.4.1

7 months ago

1.3.2

7 months ago

1.4.0

7 months ago

1.3.1

7 months ago

1.3.9

7 months ago

1.3.8

7 months ago

1.2.0

8 months ago

1.1.0

8 months ago

1.2.1

8 months ago

1.0.0

9 months ago