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 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
+ ```
package/dist/dune ADDED
@@ -0,0 +1,7 @@
1
+ (rule
2
+ (mode
3
+ (promote (until-clean)))
4
+ (deps ../src/liquidsoap_js.bc.js)
5
+ (target liquidsoap.cjs)
6
+ (action
7
+ (copy %{deps} %{target})))