liquidsoap-prettier 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/dist/dune +7 -0
- package/dist/liquidsoap.cjs +220506 -0
- package/dist/web.mjs +1 -0
- package/dune-project +2 -0
- package/package.json +32 -0
- package/src/cli.js +72 -0
- package/src/dune +8 -0
- package/src/index.js +739 -0
- package/src/liquidsoap_js.ml +17 -0
- package/src/regexp_js.ml +57 -0
- package/src/regexp_js.mli +4 -0
- package/webpack.web.cjs +17 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Liquidsoap prettier
|
|
2
|
+
|
|
3
|
+
This package provides a [Prettier](https://prettier.io/) plugin for liquidsoap code
|
|
4
|
+
as well as a `liquidsoap-prettier` binary for formatting liquidsoap scripts.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
### `liquidsoap-prettier`
|
|
9
|
+
|
|
10
|
+
The `liquidsoap-prettier` command-line utility should be installed with this
|
|
11
|
+
package and should be available following the usual node package binary
|
|
12
|
+
conventions.
|
|
13
|
+
|
|
14
|
+
It works as follows:
|
|
15
|
+
|
|
16
|
+
```shell
|
|
17
|
+
$ liquidsoap-prettier [-w|--write] path/to/file.liq "path/with/glob/pattern/**/*.liq"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Prettier plugin
|
|
21
|
+
|
|
22
|
+
The package also provides a prettier plugin which can be used to add liquidsoap script parsing to
|
|
23
|
+
your project. To enable, you need a local `package.json`.
|
|
24
|
+
|
|
25
|
+
First, install the required packages:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm install -D prettier liquidsoap-prettier
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Then add the plugin to your Prettier config:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
// .prettierrc
|
|
35
|
+
{
|
|
36
|
+
"plugins": ["liquidsoap-prettier"]
|
|
37
|
+
}
|
|
38
|
+
```
|