@patterkit/ops 0.12.0 → 0.12.2
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/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @patterkit/ops
|
|
2
|
+
|
|
3
|
+
Every operation on a Patter project as a plain function: loading, validating, exporting, formatting,
|
|
4
|
+
playing in the terminal, reports, localisation, script exports, packing, merging, and more. The `patter`
|
|
5
|
+
command line tool and the Patterpad editor are both thin front-ends over this package, so they behave the
|
|
6
|
+
same way by construction.
|
|
7
|
+
|
|
8
|
+
Most people won't need to install this directly. To play Patter dialogue in a game or web page, use
|
|
9
|
+
[`@patterkit/runtime`](https://www.npmjs.com/package/@patterkit/runtime); to work with Patter projects from
|
|
10
|
+
a terminal or a build script, use [`@patterkit/cli`](https://www.npmjs.com/package/@patterkit/cli).
|
|
11
|
+
|
|
12
|
+
## How it works
|
|
13
|
+
|
|
14
|
+
The functions don't print, prompt, or exit, and the ones that change files don't write them. They return
|
|
15
|
+
the writes they plan, and the caller applies them (`applyWrites`, or its own route through version
|
|
16
|
+
control), so a front-end decides how changes reach the disk.
|
|
17
|
+
|
|
18
|
+
## What's in it
|
|
19
|
+
|
|
20
|
+
- **Loading and checking**: `loadProject`, `runValidate`, and `runFormat`.
|
|
21
|
+
- **Exporting**: `runExport` for the `.patterc` bundle, `runExportHtml` and `runExportWeb` for playable
|
|
22
|
+
pages, and `runPlay` for a playthrough in the terminal.
|
|
23
|
+
- **Scripts**: the readable script as `.docx` or `.pdf` (`runScriptDoc`, `scriptToDocx`, `scriptToPdf`),
|
|
24
|
+
the voice script, and the editable script round trip (`exportEditableScript`, `readEditableDocx`, and
|
|
25
|
+
`planEditableImport`), which sends a script to an editor in Word or Google Docs and brings their
|
|
26
|
+
changes back as suggestions.
|
|
27
|
+
- **Localisation**: `extractLoc` and `applyLoc`, with JSON, PO, and Excel formats.
|
|
28
|
+
- **Review and production**: reports, coverage tests, search and replace, suggestions, and voice and
|
|
29
|
+
audio status.
|
|
30
|
+
- **Sharing**: `runPack` and `runUnpack` for `.patterpack` files, and `runMerge` for merging changes made
|
|
31
|
+
in two places.
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npm install @patterkit/ops
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Part of Patter
|
|
38
|
+
|
|
39
|
+
[Patter](https://patterkit.dev/) is a branching dialogue format with its own editor (Patterpad), command line
|
|
40
|
+
tool (`patter`), and runtimes for JavaScript, Unity, Unreal, and Godot. This package is one layer of the
|
|
41
|
+
JavaScript tooling, and the other `@patterkit` packages build on it. [How it fits
|
|
42
|
+
together](https://patterkit.dev/architecture/) shows where each piece sits, and the source is in the
|
|
43
|
+
[patter repository](https://github.com/patterkit/patter).
|
|
44
|
+
|
|
45
|
+
## Licence
|
|
46
|
+
|
|
47
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patterkit/ops",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "The shared operations layer: every project operation (load, validate, export, format, play, ...) as a pure function, consumed by the patter CLI and Patterpad alike.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@patterkit/compiler": "0.4.4",
|
|
31
31
|
"@patterkit/core": "0.3.1",
|
|
32
32
|
"@patterkit/model": "0.8.0",
|
|
33
|
-
"@patterkit/runtime": "0.
|
|
33
|
+
"@patterkit/runtime": "0.15.0",
|
|
34
34
|
"@wildwinter/toolkit": "^0.1.0",
|
|
35
35
|
"@xmldom/xmldom": "^0.8.15",
|
|
36
36
|
"docx": "^9.7.1",
|