Skip to content

Commit

Permalink
Fix website syntax highlighting (#1295)
Browse files Browse the repository at this point in the history
* Attempt to fix syntax highlighting in website

* Update docusaurus.config.js

* Fix: json formats comments; jsonc is not supported
  • Loading branch information
cspotcode committed Apr 9, 2021
1 parent da64349 commit 0a72d2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 4 additions & 5 deletions website/docs/configuration.md
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
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

0 comments on commit 0a72d2d

Please sign in to comment.