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

Chore/up examples #314

Merged
merged 4 commits into from
Nov 25, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [11.0.1] - 25 Nov 2024

### Changed

- updated examples and README to match the changes in version 11.0.0

## [11.0.0] - 25 Nov 2024

### Changed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ As of version 7.0.0 the TypeScript compiler is a _peer dependency_ of `ts-unused
#### Usage as a library - From TypeScript (was built with ES5 + commonjs)

```ts
import analyzeTsConfig from 'ts-unused-exports';
import { analyzeTsConfig } from 'ts-unused-exports';
const result = analyzeTsConfig('path/to/tsconfig.json');
// or const result = analyzeTsConfig('path/to/tsconfig.json', ['file1.ts']);
// or const result = analyzeTsConfig('path/to/tsconfig.json', ['file1.ts', '--excludePathsFromReport=math']);
Expand All @@ -88,7 +88,7 @@ For an example see `./example/library-usage-via-TypeScript/`.
From JavaScript - depending on your environment, you may need to navigate to reach the analyzeTsConfig() function.

```js
import analyzeTsConfig from "ts-unused-exports";
import { analyzeTsConfig } from "ts-unused-exports";
const result = analyzeTsConfig.default('path/to/tsconfig.json');
```

Expand Down
2 changes: 1 addition & 1 deletion example/library-usage-via-JavaScript/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import analyzeTsConfig from "ts-unused-exports";
import { analyzeTsConfig } from "ts-unused-exports";

try {
// need to navigate to reach the function:
Expand Down
118 changes: 89 additions & 29 deletions example/library-usage-via-TypeScript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/library-usage-via-TypeScript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "npm ci && ./node_modules/ts-unused-exports/bin/ts-unused-exports ../simple/tsconfig.json"
},
"dependencies": {
"ts-unused-exports": "^9.0.1",
"ts-unused-exports": "^11.0.0",
"typescript": "^4.9.4"
}
}
8 changes: 4 additions & 4 deletions example/library-usage-via-TypeScript/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import analyzeTsConfig from "ts-unused-exports";
import { analyzeTsConfig } from 'ts-unused-exports';
import { inc } from './math';

console.log('two', inc(1));

try {
const result = analyzeTsConfig("../simple/tsconfig.json");
console.log(result)
const result = analyzeTsConfig('../simple/tsconfig.json');
console.log(result);
} catch (e) {
console.error(e);
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-unused-exports",
"version": "11.0.0",
"version": "11.0.1",
"description": "ts-unused-exports finds unused exported symbols in your Typescript project",
"main": "lib/app.js",
"repository": {
Expand Down
Loading