Skip to content

Commit

Permalink
docs: fix README issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mkubilayk authored and acutmore committed Aug 22, 2024
1 parent 42e524b commit 9d3d37c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The benefits of this library are:
- It is fast
- Only 2.3 times slower than a native asynchronous transformer in a micro-benchmark (see [`./perf`](./perf/) folder)
- No new JavaScript code is generated, instead it re-uses slices of the existing source string
- This is particularly true if other parts of your program are already generating the TypeScript SourceFile object for other reasons because it can [be reused](#bring-your-own-ast), and producing the AST is the most time consuming part.
- This is particularly true if other parts of your program are already generating the TypeScript `SourceFile` object for other reasons because it can [be reused](#bring-your-own-ast), and producing the AST is the most time consuming part.
- 100% JavaScript runtime
- It is small
- ~700 lines of code and one dependency (`typescript`)
Expand All @@ -55,7 +55,7 @@ The benefits of this library are:
- [Source Maps](#where-are-my-sourcemaps)
- [Implementation details](#does-it-really-just-blank-out-all-the-type-annotations)
- [Unsupported syntax](#unsupported)
- [tsconfig.json](#recommend-tsconfigjson-compiler-settings)
- [tsconfig.json](#recommended-tsconfigjson-compiler-settings)
- [TSX/JSX](#tsxjsx)
- [ESM output](#ensuring-esm-output)
- [Contributions](#contributions)
Expand Down Expand Up @@ -98,7 +98,7 @@ const ast = ts.createSourceFile(...);
console.log(blankSourceFile(ast));
```

## Node.js loader
## Node.js Loader

`ts-blank-space` exposes the required [Node.js module loader hooks](https://nodejs.org/api/module.html#customization-hooks) to use `ts-blank-space` to pre-process `*.ts` that are imported before they are evaluated.

Expand All @@ -110,11 +110,11 @@ $ npm install --save-dev ts-blank-space
$ node --import ts-blank-space/register ./path/to/your/file.ts
```

In addition to loading `*.ts` files, an import resolver is also registered which will catches failed `*.js` imports and re-attempts the import replacing the extension with `.ts`. This allows import paths to choose either `.ts` or `.js` depending on which other factors the project may need to take into account such as bundling and package distribution.
In addition to loading `*.ts` files, an import resolver is also registered which catches failed `*.js` imports and re-attempts the import replacing the extension with `.ts`. This allows import paths to choose either `.ts` or `.js` depending on which other factors the project may need to take into account such as bundling and package distribution.

## Where are my SourceMaps?

Because all the JavaScript in the output is located at the same line, column, and byte-offset as the original
Because all the JavaScript in the output is located at the same line, column, and byte-offset as the original source
there is no mapping information that is lost during the transform.

## Does it really just blank out all the type annotations?
Expand Down Expand Up @@ -213,18 +213,18 @@ Have you had a good experience with this project? Why not share some love and co
We welcome issue reports [here](../../issues); be sure to choose the proper issue template for your issue, so that we can be sure you're providing the necessary information.

Before sending a [Pull Request](../../pulls), please make sure you read our
[Contribution Guidelines](https://github.com/bloomberg/.github/blob/master/CONTRIBUTING.md).
[Contribution Guidelines](https://github.com/bloomberg/.github/blob/main/CONTRIBUTING.md).

## License

Please read the [LICENSE](./LICENSE) file.

## Code of Conduct

This project has adopted a [Code of Conduct](https://github.com/bloomberg/.github/blob/master/CODE_OF_CONDUCT.md).
This project has adopted a [Code of Conduct](https://github.com/bloomberg/.github/blob/main/CODE_OF_CONDUCT.md).
If you have any concerns about the Code, or behavior which you have experienced in the project, please
contact us at opensource@bloomberg.net.

## Security Vulnerability Reporting

Please refer to the project [Security Policy](https://github.com/bloomberg/.github/blob/master/SECURITY.MD).
Please refer to the project [Security Policy](https://github.com/bloomberg/.github/blob/main/SECURITY.MD).

0 comments on commit 9d3d37c

Please sign in to comment.