Update docs
This commit is contained in:
parent
22a7cffd12
commit
197359ff22
|
@ -18,14 +18,16 @@ Install node.js v12 or newer. Then, `yarn global add @preserves/schema`.
|
||||||
Compile Preserves schema definitions to TypeScript
|
Compile Preserves schema definitions to TypeScript
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
input Input filename or glob
|
input Input directory, optionally with :<glob> on the end
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--output <directory> Output directory for modules (default: next to sources)
|
--xref <glob> Cross-reference other textual Preserves schema definitions
|
||||||
--stdout Prints each module to stdout one after the other instead of writing them to files in the `--output`
|
(default: [])
|
||||||
directory
|
--output <directory> Output directory for modules
|
||||||
--base <directory> Base directory for sources (default: common prefix)
|
--stdout Prints each module to stdout one after the other instead
|
||||||
--core <path> Import path for @preserves/core (default: "@preserves/core")
|
of writing them to files in the `--output` directory
|
||||||
|
--core <path> Import path for @preserves/core
|
||||||
|
(default: "@preserves/core")
|
||||||
--watch Watch base directory for changes
|
--watch Watch base directory for changes
|
||||||
--traceback Include stack traces in compiler errors
|
--traceback Include stack traces in compiler errors
|
||||||
--module <namespace=path> Additional Namespace=path import (default: [])
|
--module <namespace=path> Additional Namespace=path import (default: [])
|
||||||
|
|
|
@ -22,12 +22,11 @@ Install node.js v12 or newer. Then, `yarn global add @preserves/schema`.
|
||||||
Compile textual Preserves schema definitions to binary format
|
Compile textual Preserves schema definitions to binary format
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
input Input filename or glob
|
input Input directory, with optional ":glob" appended (defaults to ":**/*.prs")
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--no-bundle Emit a single Schema instead of a schema Bundle
|
--no-bundle Emit a single Schema instead of a schema Bundle
|
||||||
--base <directory> Base directory for sources (default: common prefix)
|
-h, --help display help for command
|
||||||
-h, --help display help for command
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -48,7 +47,7 @@ Given a file [`demo.prs`](demo.prs) containing:
|
||||||
|
|
||||||
running the following:
|
running the following:
|
||||||
|
|
||||||
preserves-schemac --no-bundle demo.prs
|
preserves-schemac --no-bundle .:demo.prs
|
||||||
|
|
||||||
will produce the following binary file on `stdout`:
|
will produce the following binary file on `stdout`:
|
||||||
|
|
||||||
|
@ -130,7 +129,7 @@ pretty-print it produces:
|
||||||
|
|
||||||
Given a directory tree containing multiple `*.prs` files, running
|
Given a directory tree containing multiple `*.prs` files, running
|
||||||
|
|
||||||
preserves-schemac '**.prs'
|
preserves-schemac .
|
||||||
|
|
||||||
will produce a binary `Bundle` on `stdout` containing one `Schema` for
|
will produce a binary `Bundle` on `stdout` containing one `Schema` for
|
||||||
each input file in the tree.
|
each input file in the tree.
|
||||||
|
|
Loading…
Reference in New Issue