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
|
||||
|
||||
Arguments:
|
||||
input Input filename or glob
|
||||
input Input directory, optionally with :<glob> on the end
|
||||
|
||||
Options:
|
||||
--output <directory> Output directory for modules (default: next to sources)
|
||||
--stdout Prints each module to stdout one after the other instead of writing them to files in the `--output`
|
||||
directory
|
||||
--base <directory> Base directory for sources (default: common prefix)
|
||||
--core <path> Import path for @preserves/core (default: "@preserves/core")
|
||||
--xref <glob> Cross-reference other textual Preserves schema definitions
|
||||
(default: [])
|
||||
--output <directory> Output directory for modules
|
||||
--stdout Prints each module to stdout one after the other instead
|
||||
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
|
||||
--traceback Include stack traces in compiler errors
|
||||
--module <namespace=path> Additional Namespace=path import (default: [])
|
||||
|
|
|
@ -22,11 +22,10 @@ Install node.js v12 or newer. Then, `yarn global add @preserves/schema`.
|
|||
Compile textual Preserves schema definitions to binary format
|
||||
|
||||
Arguments:
|
||||
input Input filename or glob
|
||||
input Input directory, with optional ":glob" appended (defaults to ":**/*.prs")
|
||||
|
||||
Options:
|
||||
--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
|
||||
|
||||
## Examples
|
||||
|
@ -48,7 +47,7 @@ Given a file [`demo.prs`](demo.prs) containing:
|
|||
|
||||
running the following:
|
||||
|
||||
preserves-schemac --no-bundle demo.prs
|
||||
preserves-schemac --no-bundle .:demo.prs
|
||||
|
||||
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
|
||||
|
||||
preserves-schemac '**.prs'
|
||||
preserves-schemac .
|
||||
|
||||
will produce a binary `Bundle` on `stdout` containing one `Schema` for
|
||||
each input file in the tree.
|
||||
|
|
Loading…
Reference in New Issue