@patterkit/core 0.3.1 → 0.3.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 +35 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @patterkit/core
|
|
2
|
+
|
|
3
|
+
The low-level building blocks shared by Patter's editor, command line tool, and CI: ids, readable handles,
|
|
4
|
+
reading and writing the source files, and the structural validator.
|
|
5
|
+
|
|
6
|
+
Most people won't need to install this directly. To play Patter dialogue in a game or web page, use
|
|
7
|
+
[`@patterkit/runtime`](https://www.npmjs.com/package/@patterkit/runtime); to work with Patter projects from
|
|
8
|
+
a terminal or a build script, use [`@patterkit/cli`](https://www.npmjs.com/package/@patterkit/cli).
|
|
9
|
+
|
|
10
|
+
## What's in it
|
|
11
|
+
|
|
12
|
+
- **Ids and handles**: `newId` for stable node ids, and `slug`, `hash4`, and `hash32` for the readable
|
|
13
|
+
handles and content hashes built from them.
|
|
14
|
+
- **Reading and writing source files**: `parseSource` and `canonicalStringify`, which write a project's
|
|
15
|
+
files in one canonical form so version control shows only real changes.
|
|
16
|
+
- **The structural validator**: `validateProject` checks a project and its scenes hang together (ids,
|
|
17
|
+
references, and structure) and returns a list of issues.
|
|
18
|
+
- **Scene scaffolding**: `planProject` and `planScene` plan a stub project or scene that another tool can
|
|
19
|
+
hand to a writer.
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm install @patterkit/core
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Part of Patter
|
|
26
|
+
|
|
27
|
+
[Patter](https://patterkit.dev/) is a branching dialogue format with its own editor (Patterpad), command line
|
|
28
|
+
tool (`patter`), and runtimes for JavaScript, Unity, Unreal, and Godot. This package is one layer of the
|
|
29
|
+
JavaScript tooling, and the other `@patterkit` packages build on it. [How it fits
|
|
30
|
+
together](https://patterkit.dev/architecture/) shows where each piece sits, and the source is in the
|
|
31
|
+
[patter repository](https://github.com/patterkit/patter).
|
|
32
|
+
|
|
33
|
+
## Licence
|
|
34
|
+
|
|
35
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patterkit/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Patter core: stable id generation, readable-handle computation, canonical (de)serialisation, and the structural validator.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"build": "tsup src/index.ts --format esm,cjs --dts --clean"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@patterkit/model": "0.
|
|
37
|
+
"@patterkit/model": "0.9.0",
|
|
38
38
|
"@wildwinter/toolkit": "^0.1.0",
|
|
39
39
|
"json5": "^2.2.3"
|
|
40
40
|
}
|