jostraca 0.36.0 → 0.36.1
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 +13 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# jostraca
|
|
2
2
|
|
|
3
3
|
A code and project generator. You describe an output file tree with
|
|
4
|
-
components
|
|
4
|
+
components—`Project`, `Folder`, `File`, `Content` and the rest—inside a
|
|
5
5
|
callback, and Jostraca writes the tree to disk. The callback runs first and
|
|
6
6
|
touches nothing; only then does the build phase write files. That split is why
|
|
7
7
|
a second run over code somebody has edited by hand can preserve, present, diff
|
|
8
8
|
or merge instead of overwriting.
|
|
9
9
|
|
|
10
|
+
**No template syntax to learn.** Either write code—iteration is `for`,
|
|
11
|
+
branching is `if`, reuse is a function—or mark up a file that is still valid
|
|
12
|
+
source, with the marker inside the target language's own comment syntax, so
|
|
13
|
+
`<!-- <[SLOT:head]> -->` stays valid HTML and `// <[SLOT:head]>` stays valid
|
|
14
|
+
Go. The template opens, highlights, formats, and lints like any other file
|
|
15
|
+
of its type. `$$path$$` substitutes a model value and does nothing else: no
|
|
16
|
+
conditionals, no loops, no expressions.
|
|
17
|
+
|
|
10
18
|
This is the canonical TypeScript implementation, published to npm as
|
|
11
19
|
[`jostraca`](https://www.npmjs.com/package/jostraca). A feature-parity Go port
|
|
12
20
|
lives at
|
|
@@ -57,16 +65,13 @@ The documentation set lives in
|
|
|
57
65
|
repository root, and is rendered at [jostraca.org](https://jostraca.org). It
|
|
58
66
|
follows [Diátaxis](https://diataxis.fr):
|
|
59
67
|
|
|
60
|
-
- **[Tutorial](https://github.com/jostraca/jostraca/blob/HEAD/docs/tutorial.md)
|
|
61
|
-
|
|
62
|
-
- **
|
|
63
|
-
— one page per task.
|
|
64
|
-
- **Reference** —
|
|
68
|
+
- **[Tutorial](https://github.com/jostraca/jostraca/blob/HEAD/docs/tutorial.md)**. Build a generator from nothing, then run it again over hand-edited output.
|
|
69
|
+
- **[How-to guides](https://github.com/jostraca/jostraca/blob/HEAD/docs/how-to/README.md)**. One page per task.
|
|
70
|
+
- **Reference**—
|
|
65
71
|
[components](https://github.com/jostraca/jostraca/blob/HEAD/docs/reference-components.md),
|
|
66
72
|
[options](https://github.com/jostraca/jostraca/blob/HEAD/docs/reference-options.md),
|
|
67
73
|
[utilities](https://github.com/jostraca/jostraca/blob/HEAD/docs/reference-utilities.md).
|
|
68
|
-
- **[Explanation](https://github.com/jostraca/jostraca/blob/HEAD/docs/explanation.md)
|
|
69
|
-
— the two-phase model, and what it costs.
|
|
74
|
+
- **[Explanation](https://github.com/jostraca/jostraca/blob/HEAD/docs/explanation.md)**. The two-phase model, and what it costs.
|
|
70
75
|
|
|
71
76
|
Every example in those pages is executed by `ts/test/docs.test.ts`, which runs
|
|
72
77
|
each snippet in a temp directory and compares the tree it wrote.
|