@patterkit/compiler 0.4.4 → 0.4.5

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.
Files changed (2) hide show
  1. package/README.md +37 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @patterkit/compiler
2
+
3
+ Turns a Patter project's source files into the compiled bundle (`.patterc`) that every Patter runtime
4
+ plays, checking its conditions and effects on the way.
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
+ - **Export**: `exportBundle` takes a loaded project, its scenes, and optionally its locales, and returns
13
+ the bundle, with every expression compiled and every embedded string in place.
14
+ - **Expressions**: `compileExpression` compiles one condition or effect, and `validateConditions` and
15
+ `validateInterpolation` check a project's expressions and `{@name}` placeholders against its declared
16
+ properties, reporting each problem with where it is.
17
+ - **Scopes**: `projectScopes` and `externalGameScopes` work out which scopes a project can use, including
18
+ the ones the game declares.
19
+
20
+ To build a bundle without writing code, use the `patter export` command in
21
+ [`@patterkit/cli`](https://www.npmjs.com/package/@patterkit/cli), or Patterpad's Publish menu.
22
+
23
+ ```sh
24
+ npm install @patterkit/compiler
25
+ ```
26
+
27
+ ## Part of Patter
28
+
29
+ [Patter](https://patterkit.dev/) is a branching dialogue format with its own editor (Patterpad), command line
30
+ tool (`patter`), and runtimes for JavaScript, Unity, Unreal, and Godot. This package is one layer of the
31
+ JavaScript tooling, and the other `@patterkit` packages build on it. [How it fits
32
+ together](https://patterkit.dev/architecture/) shows where each piece sits, and the source is in the
33
+ [patter repository](https://github.com/patterkit/patter).
34
+
35
+ ## Licence
36
+
37
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patterkit/compiler",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Patter compiler: compile condition/effect expressions, validate them, and export source to the runtime bundle.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,9 +34,9 @@
34
34
  "build": "tsup src/index.ts --format esm,cjs --dts --clean"
35
35
  },
36
36
  "dependencies": {
37
- "@patterkit/model": "0.8.0",
38
- "@patterkit/core": "0.3.1",
39
- "@patterkit/dialect": "0.2.4",
37
+ "@patterkit/model": "0.9.0",
38
+ "@patterkit/core": "0.3.2",
39
+ "@patterkit/dialect": "0.2.5",
40
40
  "@wildwinter/expr": "^0.5.0"
41
41
  },
42
42
  "peerDependencies": {