chordsheetjs 7.5.0 → 7.6.0
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/lib/bundle.js +16 -12
- package/lib/index.js +16 -12
- package/lib/index.js.map +1 -1
- package/lib/main.d.ts +3 -2
- package/lib/main.d.ts.map +1 -1
- package/lib/module.js +5310 -0
- package/lib/module.js.map +1 -0
- package/package.json +7 -6
- package/lib/index.html +0 -40
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chordsheetjs",
|
|
3
3
|
"author": "Martijn Versluis",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.6.0",
|
|
5
5
|
"description": "A JavaScript library for parsing and formatting chord sheets",
|
|
6
6
|
"source": "src/index.ts",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
|
+
"module": "lib/module.js",
|
|
8
9
|
"types": "./lib/main.d.ts",
|
|
9
10
|
"files": [
|
|
10
11
|
"/lib"
|
|
@@ -25,10 +26,10 @@
|
|
|
25
26
|
"@babel/plugin-proposal-object-rest-spread": "^7.17.3",
|
|
26
27
|
"@babel/preset-env": "^7.16.11",
|
|
27
28
|
"@babel/preset-typescript": "^7.16.7",
|
|
28
|
-
"@parcel/packager-ts": "2.6.
|
|
29
|
-
"@parcel/transformer-typescript-types": "2.6.
|
|
29
|
+
"@parcel/packager-ts": "2.6.2",
|
|
30
|
+
"@parcel/transformer-typescript-types": "2.6.2",
|
|
30
31
|
"@types/jest": "^27.4.1",
|
|
31
|
-
"@types/node": "^
|
|
32
|
+
"@types/node": "^18.0.0",
|
|
32
33
|
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
|
33
34
|
"@typescript-eslint/parser": "^5.18.0",
|
|
34
35
|
"browserify": "^17.0.0",
|
|
@@ -41,12 +42,12 @@
|
|
|
41
42
|
"jsdoc-to-markdown": "^7.1.1",
|
|
42
43
|
"parcel": "^2.4.1",
|
|
43
44
|
"parcel-transformer-hbs": "^1.0.4",
|
|
44
|
-
"peggy": "^
|
|
45
|
+
"peggy": "^2.0.1",
|
|
45
46
|
"pinst": "^3.0.0",
|
|
46
47
|
"print": "^1.2.0",
|
|
47
48
|
"ts-jest": "^27.1.4",
|
|
48
49
|
"ts-node": "^10.7.0",
|
|
49
|
-
"ts-pegjs": "^
|
|
50
|
+
"ts-pegjs": "^2.0.1",
|
|
50
51
|
"typescript": "^4.6.3"
|
|
51
52
|
},
|
|
52
53
|
"scripts": {
|
package/lib/index.html
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<script src="bundle.js"></script>
|
|
4
|
-
</head>
|
|
5
|
-
<body>
|
|
6
|
-
<script type="text/plain" id="chordSheet">
|
|
7
|
-
{title: Let it be}
|
|
8
|
-
{subtitle: ChordSheetJS example version}
|
|
9
|
-
{composer: John Lennon}
|
|
10
|
-
{composer: Paul McCartney}
|
|
11
|
-
{Chorus}
|
|
12
|
-
|
|
13
|
-
Written by: %{composer}
|
|
14
|
-
|
|
15
|
-
Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be
|
|
16
|
-
[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C]
|
|
17
|
-
</script>
|
|
18
|
-
<style>
|
|
19
|
-
body {
|
|
20
|
-
font-family: sans-serif;
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
23
|
-
<script>
|
|
24
|
-
const {
|
|
25
|
-
ChordProParser,
|
|
26
|
-
HtmlDivFormatter,
|
|
27
|
-
} = ChordSheetJS;
|
|
28
|
-
|
|
29
|
-
const parser = new ChordProParser();
|
|
30
|
-
const chordpro = document.getElementById("chordSheet").innerText;
|
|
31
|
-
const song = parser.parse(chordpro);
|
|
32
|
-
const formatter = new HtmlDivFormatter();
|
|
33
|
-
const disp = formatter.format(song);
|
|
34
|
-
const css = HtmlDivFormatter.cssString('.chordSheetViewer');
|
|
35
|
-
|
|
36
|
-
document.write(`<style>${css}</style>`);
|
|
37
|
-
document.write(`<div class="chordSheetViewer">${disp}</div>`);
|
|
38
|
-
</script>
|
|
39
|
-
</body>
|
|
40
|
-
</html>
|