pulpweaver4-cli 0.0.0-stage → 0.0.88

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 (78) hide show
  1. package/dist/bridge.d.ts +25 -0
  2. package/dist/bridge.js +109 -0
  3. package/dist/bridge.js.map +1 -0
  4. package/dist/build.d.ts +12 -0
  5. package/dist/build.js +95 -0
  6. package/dist/build.js.map +1 -0
  7. package/dist/chromium.d.ts +83 -0
  8. package/dist/chromium.js +213 -0
  9. package/dist/chromium.js.map +1 -0
  10. package/dist/commands.d.ts +217 -0
  11. package/dist/commands.js +162 -0
  12. package/dist/commands.js.map +1 -0
  13. package/dist/csl.d.ts +8 -0
  14. package/dist/csl.js +53 -0
  15. package/dist/csl.js.map +1 -0
  16. package/dist/index.d.ts +28 -0
  17. package/dist/index.js +135 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/lint.d.ts +13 -0
  20. package/dist/lint.js +80 -0
  21. package/dist/lint.js.map +1 -0
  22. package/dist/new.d.ts +12 -0
  23. package/dist/new.js +92 -0
  24. package/dist/new.js.map +1 -0
  25. package/dist/node-fs.d.ts +17 -0
  26. package/dist/node-fs.js +78 -0
  27. package/dist/node-fs.js.map +1 -0
  28. package/dist/page/host.d.ts +111 -0
  29. package/dist/page/host.js +202 -0
  30. package/dist/page/host.js.map +1 -0
  31. package/dist/page/test-setup.d.ts +11 -0
  32. package/dist/page/test-setup.js +24 -0
  33. package/dist/page/test-setup.js.map +1 -0
  34. package/dist/paint-corpus.d.ts +8 -0
  35. package/dist/paint-corpus.js +89 -0
  36. package/dist/paint-corpus.js.map +1 -0
  37. package/dist/plugin-commands.d.ts +26 -0
  38. package/dist/plugin-commands.js +49 -0
  39. package/dist/plugin-commands.js.map +1 -0
  40. package/dist/plugins.d.ts +23 -0
  41. package/dist/plugins.js +85 -0
  42. package/dist/plugins.js.map +1 -0
  43. package/dist/problems.d.ts +29 -0
  44. package/dist/problems.js +28 -0
  45. package/dist/problems.js.map +1 -0
  46. package/dist/profiles.d.ts +37 -0
  47. package/dist/profiles.js +224 -0
  48. package/dist/profiles.js.map +1 -0
  49. package/dist/pw.d.ts +2 -0
  50. package/dist/pw.js +4 -0
  51. package/dist/pw.js.map +1 -0
  52. package/dist/spike.d.ts +27 -0
  53. package/dist/spike.js +79 -0
  54. package/dist/spike.js.map +1 -0
  55. package/dist/test.d.ts +35 -0
  56. package/dist/test.js +228 -0
  57. package/dist/test.js.map +1 -0
  58. package/docs/README.md +9 -0
  59. package/docs/reference/commands/build.md +40 -0
  60. package/docs/reference/commands/index.md +42 -0
  61. package/docs/reference/commands/lint.md +35 -0
  62. package/docs/reference/commands/new.md +34 -0
  63. package/docs/reference/commands/preflight.md +35 -0
  64. package/docs/reference/commands/profiles.md +57 -0
  65. package/docs/reference/commands/spike.md +30 -0
  66. package/docs/reference/commands/test.md +47 -0
  67. package/package.json +40 -4
  68. package/template/chapters/01-beginning.dj +14 -0
  69. package/template/chapters/02-writing.dj +16 -0
  70. package/template/fonts/CrimsonPro-Italic-VF.ttf +0 -0
  71. package/template/fonts/CrimsonPro-VF.ttf +0 -0
  72. package/template/fonts/NotoSansSymbols2-Boxes.ttf +0 -0
  73. package/template/fonts/OFL.txt +94 -0
  74. package/template/gitignore +2 -0
  75. package/template/pulpweaver4.toml +23 -0
  76. package/template/styles/book.css +109 -0
  77. package/template/tests/book.test.ts +23 -0
  78. package/README.md +0 -3
package/docs/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # pw's documentation
2
+
3
+ The documentation of `pulpweaver4-cli`, the `pw` command, shipped in its
4
+ npm package so that it always matches the release it comes with. It is
5
+ published at https://pulpweaver.inkylabs.com, beside the core's.
6
+
7
+ - `reference/commands/` is generated from the commands' definitions
8
+ (`src/commands.ts`, which `pw --help` prints too) at each release. Don't
9
+ edit it: change the definition, and the release carries it.
@@ -0,0 +1,40 @@
1
+ ---
2
+ title: "pw build"
3
+ description: "The pw build command: write each edition, or the one named, to dist/<edition>/: the web edition's site, a print edition's PDF, the text edition's file."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ ```sh
9
+ pw build [<dir>] [--edition <name>|all]
10
+ ```
11
+
12
+ Builds the project’s editions, each into `dist/<edition>/`, emptied first: a web edition’s site, a print edition’s PDF (`dist/<edition>/<edition>.pdf`), a text edition’s file, or what a plugin’s output writes. The book is laid out in the pinned Chromium, headless, so a build gives the same bytes on any machine. Each edition’s `html` and `layout` lint rules run over the built book, and every problem is printed with its place in the source, as a compiler prints them; any error fails the build, with exit status 1.
13
+
14
+ ## Arguments
15
+
16
+ | Argument | | What it is |
17
+ | --- | --- | --- |
18
+ | `<dir>` | Optional | The project’s folder, the one with `pulpweaver4.toml`; the current folder by default. |
19
+
20
+ ## Options
21
+
22
+ | Option | What it does |
23
+ | --- | --- |
24
+ | `--edition <name>\|all` | The edition to build, by its name in `pulpweaver4.toml`; give it more than once for several. `all`, or no `--edition`, builds every edition. |
25
+
26
+ ## Examples
27
+
28
+ ```sh
29
+ pw build
30
+ ```
31
+
32
+ Build every edition of the project in this folder.
33
+
34
+ ```sh
35
+ pw build --edition paperback
36
+ ```
37
+
38
+ Build the paperback’s PDF alone.
39
+
40
+ See [the commands](index.md) for the environment variables `pw` reads and its exit statuses.
@@ -0,0 +1,42 @@
1
+ ---
2
+ title: "Commands"
3
+ description: "Every pw command, from pw new to pw preflight, with its arguments and options, and the environment pw reads."
4
+ sidebar:
5
+ order: 0
6
+ ---
7
+
8
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
9
+
10
+ `pw` is pulpweaver4’s command line, in the `pulpweaver4-cli` package: the core, run on Node with a pinned headless Chromium, so a build gives the same pages and bytes on any machine. `pw --help` lists the commands. Plugins add commands of their own.
11
+
12
+ ```sh
13
+ npm install --global pulpweaver4-cli
14
+ pw new my-first-book
15
+ cd my-first-book
16
+ pw build
17
+ ```
18
+
19
+ | Command | What it does |
20
+ | --- | --- |
21
+ | [`pw new`](new.md) | start a project in a new folder: pulpweaver4.toml, a chapter, a stylesheet, fonts and a test |
22
+ | [`pw build`](build.md) | write each edition, or the one named, to dist/<edition>/: the web edition's site, a print edition's PDF, the text edition's file |
23
+ | [`pw test`](test.md) | run the project's tests (tests/**/*.test.ts) in headless Chromium, and with --update, write their snapshots anew |
24
+ | [`pw lint`](lint.md) | run the project's lint rules as the edition's settings turn them on (its first by default), building it in headless Chromium for its html and layout rules, and with --fix, apply what the source rules can fix |
25
+ | [`pw preflight`](preflight.md) | check a PDF against our PDF/X rules: the standard the file says it is, or the one named (PDF/X-1a:2001, PDF/X-1a:2003, PDF/X-3:2002, PDF/X-3:2003, PDF/X-4), requiring an output intent in that colour space |
26
+ | [`pw spike`](spike.md) | lay out phase 0's spike page in headless Chromium, and print its lines as JSON, or paint it to a PDF: sRGB, or CMYK PDF/X-4 for GRACoL 2013 |
27
+ | [`pw profiles`](profiles.md) | put the standard output intents' ICC profiles in pw's cache, where builds find them, or list them |
28
+
29
+ ## Environment
30
+
31
+ | Variable | What it does |
32
+ | --- | --- |
33
+ | `SOURCE_DATE_EPOCH` | The date PDFs are stamped with, in seconds since 1970 UTC, when the project sets none (`date` in `pulpweaver4.toml`); never the clock’s, so a build is reproducible (https://reproducible-builds.org/specs/source-date-epoch/). |
34
+ | `PW_ANY_CHROMIUM` | Set (to anything but `0` or nothing) to lay out in a Chromium other than 153.0.8010.12 (Playwright 1.63.0’s), with a warning: another Chromium may break lines and pages differently. |
35
+
36
+ ## Exit status
37
+
38
+ | Status | Means |
39
+ | --- | --- |
40
+ | `0` | It did what it was asked, and found nothing wrong: no errors (warnings may be printed). |
41
+ | `1` | It ran, and found an error: a problem in the book, a failing test, a lint error, a PDF/X violation. |
42
+ | `2` | It was asked wrongly: an unknown command or option, a missing argument, a folder without `pulpweaver4.toml`. |
@@ -0,0 +1,35 @@
1
+ ---
2
+ title: "pw lint"
3
+ description: "The pw lint command: run the project's lint rules as the edition's settings turn them on (its first by default), building it in headless Chromium for its html and layout rules, and with --fix, apply what the source rules can fix."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ ```sh
9
+ pw lint [<project>] [--fix] [--edition <name>]
10
+ ```
11
+
12
+ Runs the project’s lint rules as the edition’s `[lint]` settings over the project’s turn them on, and prints what they report: the `source` rules over its chapters and bibliography, and, where an `html` or `layout` rule is on, the rules over the edition’s HTML and, in print, its pages, which it builds in headless Chromium as [`pw build`](build.md) does, with the same plugins. [`pw build`](build.md) reports the same lint problems for each edition it builds. Any error gives exit status 1.
13
+
14
+ ## Arguments
15
+
16
+ | Argument | | What it is |
17
+ | --- | --- | --- |
18
+ | `<project>` | Optional | The project’s folder; the current folder by default. |
19
+
20
+ ## Options
21
+
22
+ | Option | What it does |
23
+ | --- | --- |
24
+ | `--fix` | Apply the fixes the source rules give (straight quotes made curly, and so on) to the sources, pass after pass, and report what is left. |
25
+ | `--edition <name>` | Lint as this edition’s settings have it; the first edition in `pulpweaver4.toml` by default. |
26
+
27
+ ## Examples
28
+
29
+ ```sh
30
+ pw lint --fix
31
+ ```
32
+
33
+ Fix what can be fixed in the project in this folder, and list the rest.
34
+
35
+ See [the commands](index.md) for the environment variables `pw` reads and its exit statuses.
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: "pw new"
3
+ description: "The pw new command: start a project in a new folder: pulpweaver4.toml, a chapter, a stylesheet, fonts and a test."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ ```sh
9
+ pw new <dir> [--theme book]
10
+ ```
11
+
12
+ Makes a new project in a folder, which must be new or empty: a `pulpweaver4.toml` titled after the folder (`my-first-book` is “My First Book”) with a web, a paperback, a letter and a text edition, two chapters in Djot, `styles/book.css`, Crimson Pro in roman and italic (under the SIL Open Font License, with its licence), a test in `tests/`, and a `.gitignore`. Everything in it but the fonts is CC0, so you may do anything with it.
13
+
14
+ ## Arguments
15
+
16
+ | Argument | | What it is |
17
+ | --- | --- | --- |
18
+ | `<dir>` | Required | The folder to make the project in. |
19
+
20
+ ## Options
21
+
22
+ | Option | What it does |
23
+ | --- | --- |
24
+ | `--theme book` | The project’s look: `book`, the one theme so far, and the default. |
25
+
26
+ ## Examples
27
+
28
+ ```sh
29
+ pw new my-first-book
30
+ ```
31
+
32
+ Start “My First Book” in `my-first-book/`.
33
+
34
+ See [the commands](index.md) for the environment variables `pw` reads and its exit statuses.
@@ -0,0 +1,35 @@
1
+ ---
2
+ title: "pw preflight"
3
+ description: "The pw preflight command: check a PDF against our PDF/X rules: the standard the file says it is, or the one named (PDF/X-1a:2001, PDF/X-1a:2003, PDF/X-3:2002, PDF/X-3:2003, PDF/X-4), requiring an output intent in that colour space."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ ```sh
9
+ pw preflight <file.pdf> [--standard <pdf/x-…>] [--output CMYK|RGB|GRAY]
10
+ ```
11
+
12
+ Checks a PDF against pulpweaver4’s PDF/X rules, from ISO 15930, and lists each violation with its rule and page, and what it couldn’t check. It checks the standard the file claims, or the one `--standard` names (`PDF/X-1a:2001`, `PDF/X-1a:2003`, `PDF/X-3:2002`, `PDF/X-3:2003`, `PDF/X-4`). Any violation gives exit status 1. It reads any PDF, not only pulpweaver4’s, but it is no substitute for a commercial preflight before a book goes to press.
13
+
14
+ ## Arguments
15
+
16
+ | Argument | | What it is |
17
+ | --- | --- | --- |
18
+ | `<file.pdf>` | Required | The PDF to check. |
19
+
20
+ ## Options
21
+
22
+ | Option | What it does |
23
+ | --- | --- |
24
+ | `--standard <pdf/x-…>` | The standard to check against, whatever the file claims. |
25
+ | `--output CMYK\|RGB\|GRAY` | Require an output intent in this colour space, as a printer asking for CMYK would. |
26
+
27
+ ## Examples
28
+
29
+ ```sh
30
+ pw preflight dist/paperback/paperback.pdf --output CMYK
31
+ ```
32
+
33
+ Check the paperback’s PDF, and that it is for a CMYK press.
34
+
35
+ See [the commands](index.md) for the environment variables `pw` reads and its exit statuses.
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: "pw profiles"
3
+ description: "The pw profiles command: put the standard output intents' ICC profiles in pw's cache, where builds find them, or list them."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ ```sh
9
+ pw profiles get <name>… [--accept-licence]
10
+ pw profiles list
11
+ ```
12
+
13
+ Manages the standard output intents’ ICC profiles in `pw`’s cache (`$XDG_CACHE_HOME/pulpweaver4/icc`, else `~/.cache/pulpweaver4/icc`), where [`pw build`](build.md) finds them. A build fetches a shareable profile from the ICC’s registry itself; one whose owner forbids redistribution but lets each user download it (FOGRA51’s, `PSOcoated_v3.icc`, from ECI) is fetched only by `pw profiles get`, from the owner’s own file, once you accept the owner’s licence. pulpweaver4 never hosts or ships it.
14
+
15
+ ## pw profiles get
16
+
17
+ ```sh
18
+ pw profiles get <name>… [--accept-licence]
19
+ ```
20
+
21
+ Fetches each named output intent’s profile into the cache and checks it against the hash pulpweaver4 registers for it. For a profile its owner gives only to each user, it shows the owner’s licence and asks you to accept it, unless `--accept-licence` says you have.
22
+
23
+ ### Arguments
24
+
25
+ | Argument | | What it is |
26
+ | --- | --- | --- |
27
+ | `<name>…` | Required | The output intents whose profiles to get, by their names in `pulpweaver4.toml`’s `output-intent`: `FOGRA51`, `GRACoL2013`, and so on. |
28
+
29
+ ### Options
30
+
31
+ | Option | What it does |
32
+ | --- | --- |
33
+ | `--accept-licence`, `--accept-license` | Accept the owner’s licence without being asked, as CI must, having read it yourself. |
34
+
35
+ ## pw profiles list
36
+
37
+ ```sh
38
+ pw profiles list
39
+ ```
40
+
41
+ Lists each standard output intent with its profile’s file, how `pw` gets it, and where it is in the cache, if it is (and whether it is the registered profile).
42
+
43
+ ## Examples
44
+
45
+ ```sh
46
+ pw profiles get FOGRA51
47
+ ```
48
+
49
+ Show ECI’s licence, and once you accept it, put FOGRA51’s profile in the cache.
50
+
51
+ ```sh
52
+ pw profiles list
53
+ ```
54
+
55
+ List the standard output intents’ profiles, and which are in the cache.
56
+
57
+ See [the commands](index.md) for the environment variables `pw` reads and its exit statuses.
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: "pw spike"
3
+ description: "The pw spike command: lay out phase 0's spike page in headless Chromium, and print its lines as JSON, or paint it to a PDF: sRGB, or CMYK PDF/X-4 for GRACoL 2013."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ ```sh
9
+ pw spike --fonts <dir> [--pdf <file>] [--cmyk <GRACoL2013_CRPC6.icc>]
10
+ ```
11
+
12
+ Lays out the spike page, the test page pulpweaver4’s first phase was measured by, in headless Chromium, and prints its lines as JSON, or paints it to a PDF. It is for pulpweaver4’s own tests, which hold every build to the same page.
13
+
14
+ ## Options
15
+
16
+ | Option | What it does |
17
+ | --- | --- |
18
+ | `--fonts <dir>` | The folder with the spike page’s font. Required. |
19
+ | `--pdf <file>` | Paint the page to this PDF, in sRGB, rather than print its lines. |
20
+ | `--cmyk <GRACoL2013_CRPC6.icc>` | With `--pdf`, paint it in CMYK as PDF/X-4, through this GRACoL 2013 profile. |
21
+
22
+ ## Examples
23
+
24
+ ```sh
25
+ pw spike --fonts tests/fonts --pdf spike.pdf
26
+ ```
27
+
28
+ Paint the spike page to `spike.pdf`.
29
+
30
+ See [the commands](index.md) for the environment variables `pw` reads and its exit statuses.
@@ -0,0 +1,47 @@
1
+ ---
2
+ title: "pw test"
3
+ description: "The pw test command: run the project's tests (tests/**/*.test.ts) in headless Chromium, and with --update, write their snapshots anew."
4
+ ---
5
+
6
+ <!-- Generated from pulpweaver4’s code by scripts/reference; edit the code, not this page. -->
7
+
8
+ ```sh
9
+ pw test [<dir>] [<filter>…] [--update]
10
+ ```
11
+
12
+ Runs the project’s tests, `tests/**/*.test.ts` (and `.test.js`), with Vitest in the pinned Chromium, headless, as the core’s own tests run: with the test API’s globals (`build`, `expect`, `test`) and its matchers, and `build()` building the project as [`pw build`](build.md) does, with its plugins. Snapshots are kept beside the tests. The project needs nothing installed but `pw`. A failing test fails it, with exit status 1.
13
+
14
+ ## Arguments
15
+
16
+ | Argument | | What it is |
17
+ | --- | --- | --- |
18
+ | `<dir>` | Optional | The project’s folder, if the first argument is one (it has `pulpweaver4.toml`); the current folder by default. |
19
+ | `<filter>…` | Optional | Run only the test files whose paths contain one of these, as Vitest’s filters do; in a project’s folder, `pw test layout` runs `tests/layout.test.ts`. |
20
+
21
+ ## Options
22
+
23
+ | Option | What it does |
24
+ | --- | --- |
25
+ | `--update`, `-u` | Write the snapshots anew rather than comparing with them, for a change you meant to make: look at what changed before you commit it. |
26
+
27
+ ## Examples
28
+
29
+ ```sh
30
+ pw test
31
+ ```
32
+
33
+ Run every test of the project in this folder.
34
+
35
+ ```sh
36
+ pw test layout
37
+ ```
38
+
39
+ Run the tests whose paths contain `layout`.
40
+
41
+ ```sh
42
+ pw test my-book chapters --update
43
+ ```
44
+
45
+ Rewrite the snapshots of the tests in `my-book/` whose paths contain `chapters`.
46
+
47
+ See [the commands](index.md) for the environment variables `pw` reads and its exit statuses.
package/package.json CHANGED
@@ -1,6 +1,42 @@
1
1
  {
2
2
  "name": "pulpweaver4-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.88",
4
+ "description": "pw, pulpweaver4's command line: the core, hosted on Node and headless Chromium.",
5
+ "license": "CC0-1.0",
6
+ "homepage": "https://pulpweaver.inkylabs.com",
7
+ "type": "module",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://gitlab.com/inkylabs/pulpweaver4.git",
11
+ "directory": "packages/cli"
12
+ },
13
+ "bugs": {
14
+ "url": "https://gitlab.com/inkylabs/pulpweaver4/-/issues"
15
+ },
16
+ "bin": {
17
+ "pw": "./dist/pw.js"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.js"
23
+ }
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "docs",
28
+ "!dist/**/*.test.*",
29
+ "!dist/testing.*",
30
+ "template"
31
+ ],
32
+ "dependencies": {
33
+ "@vitest/browser-playwright": "5.1.0",
34
+ "esbuild": "^0.28.2",
35
+ "playwright": "1.63.0",
36
+ "pulpweaver4": "0.0.88",
37
+ "vitest": "5.1.0"
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ }
42
+ }
@@ -0,0 +1,14 @@
1
+ {#beginning}
2
+ # The Beginning
3
+
4
+ This is the first chapter of your book. It is written in Djot, a light
5
+ markup whose whole syntax is at <https://djot.net>: paragraphs are
6
+ separated by a blank line, _emphasis_ is written between underscores and
7
+ *strong emphasis* between asterisks, and a note goes where its call
8
+ is.[^notes]
9
+
10
+ Every chapter is a file in the chapters folder, and they follow one
11
+ another in the order of their names. The next one, [](#writing), says a little more.
12
+
13
+ [^notes]: In print a note sits at the foot of its page; on the web it
14
+ opens where it is called.
@@ -0,0 +1,16 @@
1
+ {#writing}
2
+ # Writing
3
+
4
+ Give any heading or block a label, a word after a hash sign in braces on
5
+ the line before it, and refer to it with an empty link to the label, as
6
+ the first chapter does to this one: the book fills in its number.
7
+
8
+ > A quotation is a paragraph that starts with a greater-than sign.
9
+
10
+ - A list is lines that start with a hyphen,
11
+ - or with numbers, one, two, three;
12
+ - and a blank line ends it.
13
+
14
+ The book is styled by the stylesheet in the styles folder, one for every
15
+ edition, and tested by the tests in the tests folder. Build it with
16
+ _pw build_, check it with _pw lint_ and test it with _pw test_.
Binary file
@@ -0,0 +1,94 @@
1
+ Copyright 2018 The Crimson Pro Project Authors (https://github.com/Fonthausen/CrimsonPro)
2
+ Copyright 2022 The Noto Project Authors (https://github.com/notofonts/symbols)
3
+
4
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
5
+ This license is copied below, and is also available with a FAQ at:
6
+ http://scripts.sil.org/OFL
7
+
8
+
9
+ -----------------------------------------------------------
10
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11
+ -----------------------------------------------------------
12
+
13
+ PREAMBLE
14
+ The goals of the Open Font License (OFL) are to stimulate worldwide
15
+ development of collaborative font projects, to support the font creation
16
+ efforts of academic and linguistic communities, and to provide a free and
17
+ open framework in which fonts may be shared and improved in partnership
18
+ with others.
19
+
20
+ The OFL allows the licensed fonts to be used, studied, modified and
21
+ redistributed freely as long as they are not sold by themselves. The
22
+ fonts, including any derivative works, can be bundled, embedded,
23
+ redistributed and/or sold with any software provided that any reserved
24
+ names are not used by derivative works. The fonts and derivatives,
25
+ however, cannot be released under any other type of license. The
26
+ requirement for fonts to remain under this license does not apply
27
+ to any document created using the fonts or their derivatives.
28
+
29
+ DEFINITIONS
30
+ "Font Software" refers to the set of files released by the Copyright
31
+ Holder(s) under this license and clearly marked as such. This may
32
+ include source files, build scripts and documentation.
33
+
34
+ "Reserved Font Name" refers to any names specified as such after the
35
+ copyright statement(s).
36
+
37
+ "Original Version" refers to the collection of Font Software components as
38
+ distributed by the Copyright Holder(s).
39
+
40
+ "Modified Version" refers to any derivative made by adding to, deleting,
41
+ or substituting -- in part or in whole -- any of the components of the
42
+ Original Version, by changing formats or by porting the Font Software to a
43
+ new environment.
44
+
45
+ "Author" refers to any designer, engineer, programmer, technical
46
+ writer or other person who contributed to the Font Software.
47
+
48
+ PERMISSION & CONDITIONS
49
+ Permission is hereby granted, free of charge, to any person obtaining
50
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
51
+ redistribute, and sell modified and unmodified copies of the Font
52
+ Software, subject to the following conditions:
53
+
54
+ 1) Neither the Font Software nor any of its individual components,
55
+ in Original or Modified Versions, may be sold by itself.
56
+
57
+ 2) Original or Modified Versions of the Font Software may be bundled,
58
+ redistributed and/or sold with any software, provided that each copy
59
+ contains the above copyright notice and this license. These can be
60
+ included either as stand-alone text files, human-readable headers or
61
+ in the appropriate machine-readable metadata fields within text or
62
+ binary files as long as those fields can be easily viewed by the user.
63
+
64
+ 3) No Modified Version of the Font Software may use the Reserved Font
65
+ Name(s) unless explicit written permission is granted by the corresponding
66
+ Copyright Holder. This restriction only applies to the primary font name as
67
+ presented to the users.
68
+
69
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70
+ Software shall not be used to promote, endorse or advertise any
71
+ Modified Version, except to acknowledge the contribution(s) of the
72
+ Copyright Holder(s) and the Author(s) or with their explicit written
73
+ permission.
74
+
75
+ 5) The Font Software, modified or unmodified, in part or in whole,
76
+ must be distributed entirely under this license, and must not be
77
+ distributed under any other license. The requirement for fonts to
78
+ remain under this license does not apply to any document created
79
+ using the Font Software.
80
+
81
+ TERMINATION
82
+ This license becomes null and void if any of the above conditions are
83
+ not met.
84
+
85
+ DISCLAIMER
86
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,2 @@
1
+ dist/
2
+ node_modules/
@@ -0,0 +1,23 @@
1
+ # The book: https://pulpweaver.inkylabs.com says what each key does.
2
+ title = "Untitled"
3
+ language = "en-US"
4
+ chapters = ["chapters/*.dj"]
5
+
6
+ # Each edition is built into dist/<edition>/ by `pw build`.
7
+ [editions.web]
8
+ media = "screen"
9
+
10
+ [editions.paperback]
11
+ media = "print"
12
+ page = "5.5in 8.5in"
13
+
14
+ [editions.letter]
15
+ media = "print"
16
+ page = "letter"
17
+
18
+ [editions.text]
19
+ output = "text"
20
+ wrap = 72
21
+
22
+ [lint]
23
+ extends = ["recommended"]
@@ -0,0 +1,109 @@
1
+ /* One stylesheet for every edition: @media print and screen, or an
2
+ edition's own name, @media (--paperback), set what differs. */
3
+
4
+ /* The fonts, from the project: Crimson Pro, and for the task list's boxes
5
+ (☐ ☑ ☒), which it lacks, Noto Sans Symbols 2, cut to them; both under
6
+ the SIL Open Font License (fonts/OFL.txt). Print editions use no other. */
7
+ @font-face {
8
+ font-family: "Crimson Pro";
9
+ src: url("../fonts/CrimsonPro-VF.ttf") format("truetype");
10
+ font-weight: 200 900;
11
+ font-style: normal;
12
+ }
13
+ @font-face {
14
+ font-family: "Crimson Pro";
15
+ src: url("../fonts/CrimsonPro-Italic-VF.ttf") format("truetype");
16
+ font-weight: 200 900;
17
+ font-style: italic;
18
+ }
19
+ @font-face {
20
+ font-family: "Noto Sans Symbols 2";
21
+ src: url("../fonts/NotoSansSymbols2-Boxes.ttf") format("truetype");
22
+ }
23
+
24
+ /* Text is hyphenated, notes and captions too, but headings. */
25
+ :root {
26
+ font-family: "Crimson Pro", "Noto Sans Symbols 2";
27
+ font-size: 12pt;
28
+ line-height: 1.35;
29
+ hyphens: auto;
30
+ }
31
+
32
+ p {
33
+ margin: 0;
34
+ text-align: justify;
35
+ }
36
+ /* A paragraph after another is indented, but for a table of contents', a
37
+ bibliography's and an index's entries, which hang, and the index's
38
+ letters. */
39
+ p + p:not(.pw-contents-entry, .csl-entry, .pw-index-entry, .pw-index-letter) {
40
+ text-indent: 1.5em;
41
+ }
42
+ h1 {
43
+ font-size: 2em;
44
+ font-weight: 500;
45
+ hyphens: manual;
46
+ line-height: 1.2;
47
+ margin: 0 0 1em;
48
+ }
49
+ /* Code is set in the book's face: add a monospaced font to the project
50
+ and name it here to set code apart. */
51
+ code, pre {
52
+ font-family: inherit;
53
+ }
54
+ blockquote {
55
+ margin: 0.75em 2em;
56
+ }
57
+ ul {
58
+ margin: 0.75em 0;
59
+ }
60
+
61
+ @media print {
62
+ :root {
63
+ font-size: 11pt;
64
+ line-height: 14pt;
65
+ }
66
+ /* Each chapter opens on a right-hand page, a third of the way down. */
67
+ h1 {
68
+ break-before: right;
69
+ margin-top: 1.5in;
70
+ }
71
+ /* The chapter's title at the head of each page but the one it opens,
72
+ and the page's number at the outside of its foot; a blank page, left
73
+ before a chapter, has neither. */
74
+ h1 {
75
+ string-set: chapter content();
76
+ }
77
+ @page {
78
+ font-size: 9pt;
79
+ @top-center {
80
+ content: string(chapter, first-except);
81
+ font-style: italic;
82
+ }
83
+ }
84
+ @page :left {
85
+ @bottom-left { content: counter(page); }
86
+ }
87
+ @page :right {
88
+ @bottom-right { content: counter(page); }
89
+ }
90
+ @page :blank {
91
+ @top-center { content: none; }
92
+ @bottom-left { content: none; }
93
+ @bottom-right { content: none; }
94
+ }
95
+ /* A link is text on paper. */
96
+ a {
97
+ color: inherit;
98
+ text-decoration: none;
99
+ }
100
+ }
101
+
102
+ @media screen {
103
+ :root {
104
+ font-size: 19px;
105
+ }
106
+ h1 {
107
+ margin-top: 2em;
108
+ }
109
+ }