astro-lilypond 0.3.0 → 0.3.1
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 +47 -0
- package/components/virtual.d.ts +5 -0
- package/dist/util.d.ts +1 -1
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +2 -2
- package/dist/util.js.map +1 -1
- package/package.json +6 -4
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# astro-lilypond
|
|
2
|
+
|
|
3
|
+
An [Astro](https://astro.build) integration for rendering [LilyPond](https://lilypond.org) music notation to images.
|
|
4
|
+
|
|
5
|
+
- Render LilyPond via Markdown or with a `<LilyPond>` component
|
|
6
|
+
- Works with both `unified()` and `satteri()` Markdown processors
|
|
7
|
+
- Supports all LilyPond syntax
|
|
8
|
+
|
|
9
|
+
Docs: https://lilypond.ky.fyi
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
### Prerequisites
|
|
14
|
+
|
|
15
|
+
Install the LilyPond binary directly from [lilypond.org](https://lilypond.org/download.html) or with `brew install lilypond` (Mac) or `apt install lilypond` (Linux).
|
|
16
|
+
|
|
17
|
+
### Installation
|
|
18
|
+
|
|
19
|
+
#### 1. Install `astro-lilypond`
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
pnpm add astro-lilypond
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### 2. Add the integration to your Astro config
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
// astro.config.mjs
|
|
29
|
+
import { defineConfig } from 'astro/config';
|
|
30
|
+
import lilypond from 'astro-lilypond';
|
|
31
|
+
|
|
32
|
+
export default defineConfig({
|
|
33
|
+
integrations: [lilypond()]
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### 3. Write your music
|
|
38
|
+
|
|
39
|
+
Write LilyPond code within fenced code blocks with the `lilypond` or `ly` language tag.
|
|
40
|
+
|
|
41
|
+
````md
|
|
42
|
+
```lilypond
|
|
43
|
+
\\score ...
|
|
44
|
+
```
|
|
45
|
+
````
|
|
46
|
+
|
|
47
|
+
Your score will be built to `.svg` or `.png` and display alongside the rest of your content.
|
package/components/virtual.d.ts
CHANGED
package/dist/util.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface LilypondPluginOptions {
|
|
|
7
7
|
format?: OutputFormat;
|
|
8
8
|
crop?: boolean;
|
|
9
9
|
}
|
|
10
|
-
/** Returns true for
|
|
10
|
+
/** Returns true for the fenced-block language identifiers that trigger SVG rendering. */
|
|
11
11
|
export declare function isLilypondLang(lang: string | null | undefined): boolean;
|
|
12
12
|
/** Normalises an OutputFormat value into a plain format string and optional resolution (DPI). */
|
|
13
13
|
export declare function resolveFormat(format: OutputFormat): {
|
package/dist/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,GAAG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E,MAAM,WAAW,qBAAqB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,GAAG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E,MAAM,WAAW,qBAAqB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEvE;AAED,iGAAiG;AACjG,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG;IACpD,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,CAGA;AAUD,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAEhD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAMvE;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAG9C"}
|
package/dist/util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/** Returns true for
|
|
1
|
+
/** Returns true for the fenced-block language identifiers that trigger SVG rendering. */
|
|
2
2
|
export function isLilypondLang(lang) {
|
|
3
|
-
return lang === "lilypond" || lang === "ly";
|
|
3
|
+
return lang === "lilypond" || lang === "ly" || lang === "ily";
|
|
4
4
|
}
|
|
5
5
|
/** Normalises an OutputFormat value into a plain format string and optional resolution (DPI). */
|
|
6
6
|
export function resolveFormat(format) {
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAQA,
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAQA,yFAAyF;AACzF,MAAM,UAAU,cAAc,CAAC,IAA+B;IAC7D,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,IAAI,IAAI,I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AU,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACzE,OAAO,+JAA+J,GAAG,QAAQ,CAAC;AACnL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-lilypond",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "An Astro integration for rendering Lilypond scores to images in Markdown.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,11 +19,13 @@
|
|
|
19
19
|
"keywords": [
|
|
20
20
|
"astro",
|
|
21
21
|
"astro-integration",
|
|
22
|
+
"engraving",
|
|
23
|
+
"image",
|
|
24
|
+
"images",
|
|
22
25
|
"lilypond",
|
|
23
|
-
"music",
|
|
24
26
|
"markdown",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
+
"music",
|
|
28
|
+
"score"
|
|
27
29
|
],
|
|
28
30
|
"repository": {
|
|
29
31
|
"type": "git",
|