Skip to content

Commit cfa195a

Browse files
authored
Update CompilerArgs path help text (#7599)
* Update CompilerArgs path help text * Update CompilerArgs path help text
1 parent d6fc76a commit cfa195a

File tree

2 files changed

+42
-26
lines changed

2 files changed

+42
-26
lines changed

rewatch/README.md

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,62 +43,78 @@ Find this output by running `yarn rewatch --help`.
4343
```
4444
Rewatch is an alternative build system for the Rescript Compiler bsb (which uses Ninja internally). It strives to deliver consistent and faster builds in monorepo setups with multiple packages, where the default build system fails to pick up changed interfaces across multiple packages
4545
46-
Usage: rewatch [OPTIONS] [COMMAND] [FOLDER]
46+
Usage: rewatch [OPTIONS] [FOLDER]
47+
rewatch <COMMAND>
48+
49+
Commands:
50+
build Build using Rewatch
51+
watch Build, then start a watcher
52+
clean Clean the build artifacts
53+
format Alias to `legacy format`
54+
dump Alias to `legacy dump`
55+
compiler-args This prints the compiler arguments. It expects the path to a rescript file (.res or .resi)
56+
legacy Use the legacy build system
57+
help Print this message or the help of the given subcommand(s)
4758
4859
Arguments:
49-
[COMMAND]
50-
Possible values:
51-
- build: Build using Rewatch
52-
- watch: Build, then start a watcher
53-
- clean: Clean the build artifacts
54-
5560
[FOLDER]
5661
The relative path to where the main rescript.json resides. IE - the root of your project
62+
63+
[default: .]
5764
5865
Options:
59-
-f, --filter <FILTER>
60-
Filter allows for a regex to be supplied which will filter the files to be compiled. For instance, to filter out test files for compilation while doing feature work
61-
62-
-a, --after-build <AFTER_BUILD>
63-
This allows one to pass an additional command to the watcher, which allows it to run when finished. For instance, to play a sound when done compiling, or to run a test suite. NOTE - You may need to add '--color=always' to your subcommand in case you want to output colour as well
64-
65-
-n, --no-timing [<NO_TIMING>]
66-
[default: false]
67-
[possible values: true, false]
68-
6966
-v, --verbose...
7067
Increase logging verbosity
7168
7269
-q, --quiet...
7370
Decrease logging verbosity
7471
72+
-f, --filter <FILTER>
73+
Filter files by regex
74+
75+
Filter allows for a regex to be supplied which will filter the files to be compiled. For instance, to filter out test files for compilation while doing feature work.
76+
77+
-a, --after-build <AFTER_BUILD>
78+
Action after build
79+
80+
This allows one to pass an additional command to the watcher, which allows it to run when finished. For instance, to play a sound when done compiling, or to run a test suite. NOTE - You may need to add '--color=always' to your subcommand in case you want to output color as well
81+
7582
-c, --create-sourcedirs [<CREATE_SOURCEDIRS>]
83+
Create source_dirs.json
84+
7685
This creates a source_dirs.json file at the root of the monorepo, which is needed when you want to use Reanalyze
7786
7887
[default: false]
7988
[possible values: true, false]
8089
81-
--compiler-args <COMPILER_ARGS>
82-
This prints the compiler arguments. It expects the path to a rescript.json file. This also requires --bsc-path and --rescript-version to be present
83-
8490
--dev [<DEV>]
91+
Build development dependencies
92+
8593
This is the flag to also compile development dependencies It's important to know that we currently do not discern between project src, and dependencies. So enabling this flag will enable building _all_ development dependencies of _all_ packages
8694
8795
[default: false]
8896
[possible values: true, false]
8997
90-
--rescript-version <RESCRIPT_VERSION>
91-
To be used in conjunction with compiler_args
98+
-n, --no-timing [<NO_TIMING>]
99+
Disable timing on the output
100+
101+
[default: false]
102+
[possible values: true, false]
103+
104+
-s, --snapshot-output [<SNAPSHOT_OUTPUT>]
105+
simple output for snapshot testing
106+
107+
[default: false]
108+
[possible values: true, false]
92109
93110
--bsc-path <BSC_PATH>
94-
A custom path to bsc
111+
Custom path to bsc
95112
96113
-h, --help
97114
Print help (see a summary with '-h')
98115
99116
-V, --version
100117
Print version
101-
102118
```
103119

104120
# Contributing

rewatch/src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ pub enum Command {
174174
#[arg(allow_hyphen_values = true, num_args = 0..)]
175175
dump_args: Vec<OsString>,
176176
},
177-
/// This prints the compiler arguments. It expects the path to a rescript.json file.
177+
/// This prints the compiler arguments. It expects the path to a rescript file (.res or .resi).
178178
CompilerArgs {
179-
/// Path to a rescript.json file
179+
/// Path to a rescript file (.res or .resi)
180180
#[command()]
181181
path: String,
182182

0 commit comments

Comments
 (0)