Skip to content

Improve the coverage of the README (#995) - #1000

Merged
cspotcode merged 7 commits into
TypeStrong:masterfrom
KasparEtter:readme
Apr 20, 2020
Merged

cspotcode merged 7 commits into
TypeStrong:masterfrom
KasparEtter:readme

Conversation

@KasparEtter

Copy link
Copy Markdown
Contributor

@cspotcode

Copy link
Copy Markdown
Collaborator

Thanks, I made a bunch of tweaks, reverted unrelated formatting changes.

Re the behavior of --script-mode when the script is a symlink, we should figure out if that behavior is intentional or a bug. Better to iron that out first, than to potentially state that a bug is intended via our README.

@cspotcode
cspotcode requested a review from blakeembrey April 8, 2020 01:56

@KasparEtter KasparEtter left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your "review". I left some comments and trust that you take it from here (and see that this gets merged). 🙂 This improved README would have helped me a lot.

Comment thread README.md
Most options can be specified by a `"ts-node"` object in `tsconfig.json` using their programmatic, camelCase names. For example, to enable `--transpile-only`:

```json
// tsconfig.json

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, comments are not allowed in JSON. Given the context is given in the line above, we could/should skip this here.

Comment thread README.md
* `readFile`: Custom TypeScript-compatible file reading function
* `fileExists`: Custom TypeScript-compatible file existence function

### Options via tsconfig.json

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intentionally had this without a title in the CLI and Programmatic Options section as my understanding is that this only applies to those options (but not the CLI-only or programmatic-only options). Now we are mixing with the titles and sections what options are available and how to provide them. But given that neither approach is perfect, just do you what you think is best.

Comment thread README.md
* `--version` Prints version information
* `-h, --help` Prints the help text
* `-v, --version` Prints the version. `-vv` prints node and typescript compiler versions, too
* `-s, --script-mode` Resolve config relative to the directory of the passed script instead of the current directory. Changes default of `--dir`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve -> Resolves for consistency

@KasparEtter

Copy link
Copy Markdown
Contributor Author

Re the behavior of --script-mode when the script is a symlink, we should figure out if that behavior is intentional or a bug.

I leave it to you whether you want to create a new issue for this or not. Progress on this would be appreciated, though. 🤓

@cspotcode
cspotcode merged commit 7160cfd into TypeStrong:master Apr 20, 2020
hanzo-dev pushed a commit to hanzoai/ts-node that referenced this pull request Sep 9, 2026
* Improve the coverage of the README (TypeStrong#995)

* Revert formatting changes

* revert formatting changes

* revert formatting changes

* Add explanation for -vv flag

* tweaking docs

* more tweaks

Co-authored-by: Andrew Bradley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants