|
1 |
| -# angulartools README |
| 1 | +# AngularTools |
2 | 2 |
|
3 |
| -This is the README for your extension "angulartools". After writing up a brief description, we recommend including the following sections. |
| 3 | +AngularTools is a collection of tools for exploring an Angular project, help you with documenting, reverse engineering a project or help when refactoring. |
4 | 4 |
|
5 |
| -## Features |
6 |
| - |
7 |
| -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. |
8 |
| - |
9 |
| -For example if there is an image subfolder under your extension project workspace: |
| 5 | +Some of the tools may seem very basic, but can be a powerful help when you have them right at your fingertips. |
10 | 6 |
|
11 |
| -\!\[feature X\]\(images/feature-x.png\) |
12 |
| - |
13 |
| -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. |
| 7 | +## Features |
14 | 8 |
|
15 |
| -## Requirements |
| 9 | +* Generate DGML graph of project component hierarchy |
| 10 | +* Show the component hierarchy |
| 11 | +* Show the directory structure of the project |
| 12 | +* Generate list of packages used in the project |
| 13 | +* List all imports |
16 | 14 |
|
17 |
| -If you have any requirements or dependencies, add a section describing those and how to install and configure them. |
| 15 | +Below is a detailed description of each feature. |
18 | 16 |
|
19 |
| -## Extension Settings |
| 17 | +### Generate DGML graph of project component hierarchy [#](#generate-dgml-graph- 'Generate DGML graph of project component hierarchy') |
20 | 18 |
|
21 |
| -Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. |
| 19 | +The Generate Directed Graph Markup Language ([dgml](https://docs.microsoft.com/en-us/visualstudio/modeling/directed-graph-markup-language-dgml-reference)) file command analyzes the all angular components and generates a graph of the relationship between the components. |
22 | 20 |
|
23 |
| -For example: |
| 21 | +The dgml file can be viewed and modified using Microsoft Visual Studio. I don't believe there is an extension for Visual Studio Code yet for viewing dgml files. |
24 | 22 |
|
25 |
| -This extension contributes the following settings: |
| 23 | + |
26 | 24 |
|
27 |
| -* `myExtension.enable`: enable/disable this extension |
28 |
| -* `myExtension.thing`: set to `blah` to do something |
| 25 | +### Show the component hierarchy [#](#show-component-hierarchy- 'Show the component hierarchy') |
29 | 26 |
|
30 |
| -## Known Issues |
| 27 | +If you don't want install Microsoft Visual Studio or you are on a platform not supporting Microsoft Visual Studio to view the dgml files with the component relationship, you can use the 'Show the component hierarchy' command to render the hierarchy and show it directly in vscode. |
31 | 28 |
|
32 |
| -Calling out known issues can help limit users opening duplicate issues against your extension. |
| 29 | +This command uses a vscode webview extension component to render the hierarchy using html, javascript and the [Vis.js](https://visjs.org/index.html) javascript library. This has the downside that copying the generated graph to the clipboard is not yet possible due to limitations in the vscode extension api. So to overcome this limitation the generated graph can be saved as a Png file to the root of the project you are analyzing. |
33 | 30 |
|
34 |
| -## Release Notes |
| 31 | + |
35 | 32 |
|
36 |
| -Users appreciate release notes as you update your extension. |
| 33 | +You can also choose to save a selection from the graph as shown in the example below. |
37 | 34 |
|
38 |
| -### 1.0.0 |
| 35 | + |
39 | 36 |
|
40 |
| -Initial release of ... |
| 37 | +### Show the directory structure of the project [#](#directory-structure- 'Show the directory structure of the project') |
41 | 38 |
|
42 |
| -### 1.0.1 |
| 39 | +This command lists the entire directory structure of the currently open project. Sometimes this can be a quick way to get an overview of the project if you are new to the project before og maybe need to document it. |
43 | 40 |
|
44 |
| -Fixed issue #. |
| 41 | +The directory structure will be listed in the output window for the AngularTools extension for easy copy/pasting. |
45 | 42 |
|
46 |
| -### 1.1.0 |
| 43 | + |
47 | 44 |
|
48 |
| -Added features X, Y, and Z. |
| 45 | +### Generate list of packages used in the project [#](#package-json-to-markdown- 'Generate list of packages used in the project') |
49 | 46 |
|
50 |
| ------------------------------------------------------------------------------------------------------------ |
| 47 | +Sometimes your boss or a customer requires documentation of which packages is used in the project. This command can save you a lot of tedious manual work by analyzing the package.json file and for each referenced package queries the [npmjs.com](https://www.npmjs.com/) website to fetch the description for the package and from that generates a Markdown file with a table of the packages with their descriptions. |
51 | 48 |
|
52 |
| -## Working with Markdown |
| 49 | + |
53 | 50 |
|
54 |
| -**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: |
| 51 | +### List all imports [#](#list-all-imports- 'List all imports') |
55 | 52 |
|
56 |
| -* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux) |
57 |
| -* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux) |
58 |
| -* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets |
| 53 | +This command will analyse all Angular components in the project and collect all the imports of the components together with the number of times the imported component is used. This can be useful when refactoring or identifying frequently used modules. Usually frequently used modules needs extra attention or care before being changed during refactoring. You can also use the command to identify modules that are not referenced in a consistent way where some components are using relative path and some components using path-aliases. |
59 | 54 |
|
60 |
| -### For more information |
| 55 | + |
61 | 56 |
|
62 |
| -* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) |
63 |
| -* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) |
| 57 | +## Third party components and resources |
64 | 58 |
|
65 |
| -**Enjoy!** |
| 59 | +* [Vis.js](https://visjs.org/index.html) - Used for generating the directed graph for showing the component hierarchy. |
| 60 | +* [npmjs.com](https://www.npmjs.com/) - The extension queries the NpmJs.com api. |
0 commit comments