Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix website syntax highlighting #1295

Merged
merged 3 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions website/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Configuration

You can set options by passing them before the script path, via programmatic usage, via `tsconfig.json`, or via environment variables.

```sh
```shell
ts-node --compiler ntypescript --project src/tsconfig.json hello-world.ts
```

Expand All @@ -15,8 +15,7 @@ ts-node --compiler ntypescript --project src/tsconfig.json hello-world.ts

`ts-node` loads `tsconfig.json` automatically. Use this recommended configuration as a starting point.

```jsonc
// tsconfig.json
```json title="tsconfig.json"
{
"ts-node": {
// Most ts-node options can be specified here using their programmatic, camel-case names.
Expand Down Expand Up @@ -94,12 +93,12 @@ _The name of the environment variable and the option's default value are denoted

We recommend using the `NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_options) environment variable to pass options to `node`.

```
```shell
NODE_OPTIONS='--trace-deprecation --abort-on-uncaught-exception' ts-node ./index.ts
```

Alternatively, you can invoke `node` directly and install `ts-node` via `--require`/`-r`

```
```shell
node --trace-deprecation --abort-on-uncaught-exception -r ts-node/register ./index.ts
```
4 changes: 4 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ module.exports = {
],
// copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
// for syntax highlighting
// additionalLanguages: ['powershell'],
},
},
presets: [
[
Expand Down