doc: RFC: husht command line and top-level behavior #1
25
README.md
25
README.md
@ -33,24 +33,19 @@ is a list of files, directories or glob patterns, defaulting to `.`. A
|
|||||||
directory `dir` is interpreted the same way as the glob pattern `dir/**` --
|
directory `dir` is interpreted the same way as the glob pattern `dir/**` --
|
||||||
in other words, all files recursively within that directory. Glob patterns
|
in other words, all files recursively within that directory. Glob patterns
|
||||||
are matched and all matching files are added to the list of files to process.
|
are matched and all matching files are added to the list of files to process.
|
||||||
If there is a destination directory (see below), all files in the destination
|
All files in the output directory are ignored. Files that do not have
|
||||||
directory are ignored. Files that do not have extension `.toml` or `.hsh` are
|
extension `.toml` or `.hsh` are ignored. The former are copied unchanged;
|
||||||
ignored. The former are copied unchanged; the latter are transformed per the
|
the latter are transformed per the husht language specification into
|
||||||
husht language specification into Rust `.rs` files.
|
Rust `.rs` files.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
- -h, --help -- Print a usage summary and exit
|
- -h, --help -- Print a usage summary and exit
|
||||||
- -o, --destination [dir/file] -- Specifies the destination of the
|
- --out-dir [dir] -- Specifies the output directory of the transformed
|
||||||
transformed file(s). If the destination is a single file, the sources must
|
file(s), defaulting to `rust`. The transform of each source file is
|
||||||
be as well, and the one file is transformed into the other. A destination
|
written into the output directory, preserving its relative path to its
|
||||||
specification without an extension is assumed to be a directory. The
|
"root". The root of a file added by virtue of a glob is the top level
|
||||||
default destination is `rust`.
|
directory of that glob pattern, or the current directory if none.
|
||||||
|
The root of a file specified explicitly is the current directory.
|
||||||
If the destination is a directory, then the transform of each source file
|
|
||||||
is written into that directory, preserving its relative path to its "root".
|
|
||||||
The root of a file added by virtue of a glob is the top level directory
|
|
||||||
of that glob pattern. The root of a file specified explicitly is the
|
|
||||||
current directory.
|
|
||||||
|
|
||||||
For example, if the `src` directory contains `main.hsh`, `sub/crate.hsh`, and
|
For example, if the `src` directory contains `main.hsh`, `sub/crate.hsh`, and
|
||||||
`Cargo.toml` (and there are no other .hsh or .toml files in the directory
|
`Cargo.toml` (and there are no other .hsh or .toml files in the directory
|
||||||
|
Loading…
Reference in New Issue
Block a user