Skip to content

Commit 455343c

Browse files
authored
Merge pull request #229 from tkskto/develop
v0.6.0
2 parents 97d260d + 96af2e7 commit 455343c

20 files changed

+530
-564
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"multiline-comment-style": 0,
1717
"@typescript-eslint/no-var-requires": 0,
1818
"no-console": 0,
19-
"no-new": 0
19+
"no-new": 0,
20+
"arrow-body-style": 0
2021
}
2122
}

CHANGELOG.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
# Changelog
22

3+
## 0.6.0
4+
5+
### enhancement
6+
7+
- add getImportDeclarationTree API.
8+
9+
### Chores
10+
11+
- \#210 `express` to v4.8.12
12+
313
## 0.5.2
414

515
### Chores
616

717
- \#210 update dependency
8-
- `commander` to v9.4.1
9-
- `globby` to v13.1.2
10-
- `vue-eslint-parser` to v9.1.0
11-
- `ws` to v8.11.0
18+
- `commander` to v9.4.1
19+
- `globby` to v13.1.2
20+
- `vue-eslint-parser` to v9.1.0
21+
- `ws` to v8.11.0
1222

1323
## 0.5.1
1424

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,22 @@ npm exec vca -- --dir .
4646
* `-o` or `--out` : output directory. JSON file will output here.
4747
* `-p` or `--port` : select a port number for the local server.
4848

49-
## License
49+
## API
5050

51-
MIT License.
51+
vue-component-analyzer is also available as an API from v0.6.0.
52+
53+
This API is intended to be used for testing.
54+
55+
```javascript
56+
import {getImportDeclarationTree} from '@tkskto/vue-component-analyzer';
57+
58+
const jsonOfTree = getImportDeclarationTree('entryFile.vue');
59+
```
60+
61+
See [index.d.ts](./types/index.d.ts) for details of types.
5262

63+
(`lastModifiedTime` can be noise. If you don't need it remove explicitly.)
5364

65+
## License
66+
67+
MIT License.

bin/analyze.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
import {vueComponentAnalyze} from '../dist/index.mjs';
3+
import {analyzeFromCLI} from '../dist/index.mjs';
44

55
/**
66
* Catch and report unexpected error.
@@ -14,12 +14,12 @@ function onCatchError(error) {
1414
process.exit(1);
1515
}
1616

17-
(function main() {
17+
(async function main() {
1818
process.on('uncaughtException', onCatchError);
1919
process.on('unhandledRejection', onCatchError);
2020

2121
try {
22-
vueComponentAnalyze();
22+
await analyzeFromCLI();
2323
} catch (err) {
2424
onCatchError(err);
2525
}

0 commit comments

Comments
 (0)