Skip to content

Commit

Permalink
Merge pull request #229 from tkskto/develop
Browse files Browse the repository at this point in the history
v0.6.0
  • Loading branch information
tkskto authored Dec 4, 2022
2 parents 97d260d + 96af2e7 commit 455343c
Show file tree
Hide file tree
Showing 20 changed files with 530 additions and 564 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"multiline-comment-style": 0,
"@typescript-eslint/no-var-requires": 0,
"no-console": 0,
"no-new": 0
"no-new": 0,
"arrow-body-style": 0
}
}
18 changes: 14 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
# Changelog

## 0.6.0

### enhancement

- add getImportDeclarationTree API.

### Chores

- \#210 `express` to v4.8.12

## 0.5.2

### Chores

- \#210 update dependency
- `commander` to v9.4.1
- `globby` to v13.1.2
- `vue-eslint-parser` to v9.1.0
- `ws` to v8.11.0
- `commander` to v9.4.1
- `globby` to v13.1.2
- `vue-eslint-parser` to v9.1.0
- `ws` to v8.11.0

## 0.5.1

Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,22 @@ npm exec vca -- --dir .
* `-o` or `--out` : output directory. JSON file will output here.
* `-p` or `--port` : select a port number for the local server.

## License
## API

MIT License.
vue-component-analyzer is also available as an API from v0.6.0.

This API is intended to be used for testing.

```javascript
import {getImportDeclarationTree} from '@tkskto/vue-component-analyzer';

const jsonOfTree = getImportDeclarationTree('entryFile.vue');
```

See [index.d.ts](./types/index.d.ts) for details of types.

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

## License

MIT License.
6 changes: 3 additions & 3 deletions bin/analyze.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import {vueComponentAnalyze} from '../dist/index.mjs';
import {analyzeFromCLI} from '../dist/index.mjs';

/**
* Catch and report unexpected error.
Expand All @@ -14,12 +14,12 @@ function onCatchError(error) {
process.exit(1);
}

(function main() {
(async function main() {
process.on('uncaughtException', onCatchError);
process.on('unhandledRejection', onCatchError);

try {
vueComponentAnalyze();
await analyzeFromCLI();
} catch (err) {
onCatchError(err);
}
Expand Down
Loading

0 comments on commit 455343c

Please sign in to comment.