@plylang/plylang 1.0.11 → 1.0.12

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 +3 -2
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -329,11 +329,12 @@ A `foreign` word has no body. Its implementation lives in the foreign directory,
329
329
  : foreign length ( (Array a) -- Num )
330
330
  ```
331
331
 
332
- The foreign directory is `foreign` when that directory exists, or the string `ply.foreign` when the field is set. It is required when the package has such a word. It lies inside the package and is distinct from the source directory and the output directory. The generated `.js` imports the implementation from there. Those files are not copied into `dist`. A new package writes `ply.language` and leaves `source`, `foreign`, and `out` unset: those directories are `src`, `foreign`, and `dist`. `ply.entry` names the module a pathless package import opens, and the `exports` key `.`.
332
+ The foreign directory is `foreign` when that directory exists, or the string `ply.foreign` when the field is set. It is required when the package has such a word. It lies inside the package and is distinct from the source directory and the output directory. The generated `.js` imports the implementation from there. Those files are not copied into `dist`. A new package writes `ply.language` and leaves `source`, `foreign`, and `out` unset: those directories are `src`, `foreign`, and `dist`. `ply.entry` names the module a pathless package import opens, and the `exports` key `.`. `plylang compile` writes `script.js` in the output directory: one classic script for a page. It inlines the bindings `main` reaches and calls `main()` at the end. That module is `ply.entry`, and `main` has scheme `( -- Unit )`.
333
333
 
334
334
  ```text
335
335
  plylang check [dir]
336
336
  plylang build [dir] [--exports]
337
+ plylang compile [dir]
337
338
  plylang test [pattern]
338
339
  plylang docs [dir] [--out <file>]
339
340
  plylang check --parse <file>
@@ -344,7 +345,7 @@ plylang check --js <file>
344
345
 
345
346
  `plylang test` builds the package, then compiles and runs the files that match one pattern. The pattern is relative to the package root. The default is `test/**/*.ply`. `*` matches inside one path segment. `**` matches across directories. Quote the pattern so the shell does not expand `*`. A test is a word `( -- Verdict )`. The runner calls each one in source order and uses the word as its name. `expect` compares two values. `pass` and `differ` build a verdict when those values have no `Showable` instance. The words live in `@plylang/test`. A file with no such word may export `suite` with scheme `( -- (Array Verdict) )` instead. A file under `test/` with neither is a utility. A test imports it by its path under `test/`, and a source file cannot. The runner does not run a utility. A source file cannot import a package that is only a `devDependency`. A test can. A file under the source directory stays where `build` wrote it. Any other test file is compiled in that package, written under the output directory for the run, and deleted afterwards. The report names each file and each check. A check also prints `file:line` of its word. A failing check prints its text under the name. One check that throws still lets the other checks run. A file that does not compile or does not run prints the diagnostic, and the other files still run. A failed check, a compile error, or a thrown suite exits 1. No file matched exits 1 with `no tests matched`. Color is used when stdout is a terminal and `NO_COLOR` is unset.
346
347
 
347
- A word named `main` whose scheme is `( -- Unit )` is the program of that module. It may stay off the `@` list. `build` calls it at the bottom of that module's `.js`, and only when Node started that file. `node dist/App.js` runs the program. An import of the module does not. A `package.json` script can name that file. Several modules may each have a `main`. A module without one is a library. Any other scheme on the name `main` is an error.
348
+ A word named `main` whose scheme is `( -- Unit )` is the program of that module. It may stay off the `@` list. `build` calls it at the bottom of that module's `.js`, and only when Node started that file. `node dist/App.js` runs the program. An import of the module does not. A `package.json` script can name that file. Several modules may each have a `main`. A module without one is a library. Any other scheme on the name `main` is an error. `plylang compile` also writes those modules, then `script.js` beside them. The file is the program of `ply.entry`. A binding is inlined when `main` can call it. The modules themselves still carry the Node guard. `compile` does not rewrite `exports`.
348
349
 
349
350
  `plylang docs` writes `DOCS.md` at the package root. `--out` names another file. A module heading is the string used to import it: the package name and the path, or only the path when there is no name. The prose comes from `..`. Inside a module the sections are `Types`, `Classes`, `Instances`, and `Words`. An empty section is left out. The name of a type, a class, or a word is a heading under its section. `Instances` is a list of `#` heads, with no comment and no method bindings.
350
351
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plylang/plylang",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Ply compiler and language server",
5
5
  "license": "MIT",
6
6
  "author": "Algosail",
@@ -33,12 +33,12 @@
33
33
  "bin/native.js"
34
34
  ],
35
35
  "optionalDependencies": {
36
- "@plylang/plylang-darwin-arm64": "1.0.11",
37
- "@plylang/plylang-darwin-x64": "1.0.11",
38
- "@plylang/plylang-linux-arm64": "1.0.11",
39
- "@plylang/plylang-linux-x64": "1.0.11",
40
- "@plylang/plylang-win32-arm64": "1.0.11",
41
- "@plylang/plylang-win32-x64": "1.0.11"
36
+ "@plylang/plylang-darwin-arm64": "1.0.12",
37
+ "@plylang/plylang-darwin-x64": "1.0.12",
38
+ "@plylang/plylang-linux-arm64": "1.0.12",
39
+ "@plylang/plylang-linux-x64": "1.0.12",
40
+ "@plylang/plylang-win32-arm64": "1.0.12",
41
+ "@plylang/plylang-win32-x64": "1.0.12"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "cargo build --release",