@airmark/quiver 0.1.0 → 0.3.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/README.md +6 -8
- package/index.js +1 -1
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ and aligned to the current Quillmark spec.
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
npm install @airmark/quiver @quillmark/quiver@0.
|
|
20
|
+
npm install @airmark/quiver @quillmark/quiver@0.4.0 @quillmark/wasm@0.59.0
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
@@ -26,12 +26,10 @@ npm install @airmark/quiver @quillmark/quiver@0.2.0 @quillmark/wasm@0.59.0
|
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
28
|
import { Quillmark, Document } from '@quillmark/wasm';
|
|
29
|
-
import { QuiverRegistry } from '@quillmark/quiver/node';
|
|
30
29
|
import { loadAirmarkQuiver } from '@airmark/quiver';
|
|
31
30
|
|
|
32
31
|
const engine = new Quillmark();
|
|
33
32
|
const quiver = await loadAirmarkQuiver();
|
|
34
|
-
const registry = new QuiverRegistry({ engine, quivers: [quiver] });
|
|
35
33
|
|
|
36
34
|
const doc = Document.fromMarkdown(`---
|
|
37
35
|
QUILL: usaf_memo@0.2
|
|
@@ -43,8 +41,7 @@ signature_block: ["FIRST M. LAST, Rank, USAF", "Duty Title"]
|
|
|
43
41
|
|
|
44
42
|
Body of the memo.`);
|
|
45
43
|
|
|
46
|
-
const
|
|
47
|
-
const quill = await registry.getQuill(canonicalRef);
|
|
44
|
+
const quill = await quiver.getQuill(doc.quillRef, { engine });
|
|
48
45
|
const { artifacts } = quill.render(doc, { format: 'pdf' });
|
|
49
46
|
```
|
|
50
47
|
|
|
@@ -54,7 +51,7 @@ const { artifacts } = quill.render(doc, { format: 'pdf' });
|
|
|
54
51
|
import { Quiver } from '@quillmark/quiver/node';
|
|
55
52
|
import { QUIVER_DIR } from '@airmark/quiver';
|
|
56
53
|
|
|
57
|
-
const quiver = await Quiver.
|
|
54
|
+
const quiver = await Quiver.fromDir(QUIVER_DIR);
|
|
58
55
|
```
|
|
59
56
|
|
|
60
57
|
## Layout
|
|
@@ -78,8 +75,9 @@ quills/
|
|
|
78
75
|
|
|
79
76
|
`quiver.test.js` at the repo root runs the
|
|
80
77
|
[`@quillmark/quiver/testing`](https://www.npmjs.com/package/@quillmark/quiver)
|
|
81
|
-
suite under [
|
|
82
|
-
pair through the full load +
|
|
78
|
+
suite under the built-in [`node:test`](https://nodejs.org/api/test.html) runner,
|
|
79
|
+
validating each `(quill, version)` pair through the full load +
|
|
80
|
+
`engine.quill(tree)` compile pipeline:
|
|
83
81
|
|
|
84
82
|
```bash
|
|
85
83
|
npm install
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airmark/quiver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Airmark Quiver — Air Force and DAF document Quills for Quillmark.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -21,16 +21,17 @@
|
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@quillmark/quiver": "0.
|
|
24
|
+
"@quillmark/quiver": "0.4.0",
|
|
25
25
|
"@quillmark/wasm": "0.59.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@quillmark/quiver": "0.
|
|
29
|
-
"@quillmark/wasm": "0.59.0"
|
|
30
|
-
"vitest": "^4.0.18"
|
|
28
|
+
"@quillmark/quiver": "0.4.0",
|
|
29
|
+
"@quillmark/wasm": "0.59.0"
|
|
31
30
|
},
|
|
32
31
|
"scripts": {
|
|
33
|
-
"test": "
|
|
32
|
+
"test": "node --test",
|
|
33
|
+
"release:patch": "npm version patch -m \"chore(release): %s\" && git push --follow-tags",
|
|
34
|
+
"release:minor": "npm version minor -m \"chore(release): %s\" && git push --follow-tags"
|
|
34
35
|
},
|
|
35
36
|
"keywords": [
|
|
36
37
|
"quillmark",
|
|
@@ -40,5 +41,9 @@
|
|
|
40
41
|
"daf",
|
|
41
42
|
"airmark"
|
|
42
43
|
],
|
|
43
|
-
"license": "Apache-2.0"
|
|
44
|
+
"license": "Apache-2.0",
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "https://github.com/nibsbin/airmark-quiver"
|
|
48
|
+
}
|
|
44
49
|
}
|