Skip to content

Commit

Permalink
Chore/up examples (#314)
Browse files Browse the repository at this point in the history
* Up examples

* Up example package files

* up README

* 11.0.1
  • Loading branch information
mrseanryan authored Nov 25, 2024
1 parent a4b5bc3 commit 3e24af4
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 39 deletions.
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

0 comments on commit 3e24af4

Please sign in to comment.