File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change 1+ /**
2+ * name: filename
3+ * props: props defined in the component
4+ * size: filesize
5+ * lastModifiedTime: date modified the file
6+ * children: information array this file is importing
7+ */
18export interface FileReport {
29 name : string ,
310 props : string ,
You can’t perform that action at this time.
0 commit comments