|
1 | 1 | # Ast |
2 | 2 |
|
3 | | -A PowerShell module for using the Abstract Syntax Tree (AST) on any PowerShell code. |
4 | | - |
5 | | -## Prerequisites |
6 | | - |
7 | | -This uses the following external resources: |
8 | | -- The [PSModule framework](https://github.com/PSModule) for building, testing and publishing the module. |
| 3 | +Ast is a PowerShell module for using the PowerShell abstract syntax tree to analyze PowerShell code. |
9 | 4 |
|
10 | 5 | ## Installation |
11 | 6 |
|
12 | | -To install the module from the PowerShell Gallery, you can use the following command: |
| 7 | +Install the module from the PowerShell Gallery: |
13 | 8 |
|
14 | 9 | ```powershell |
15 | 10 | Install-PSResource -Name Ast |
16 | 11 | Import-Module -Name Ast |
17 | 12 | ``` |
18 | 13 |
|
19 | | -## Usage |
20 | | - |
21 | | -Here is a list of example that are typical use cases for the module. |
| 14 | +## Documentation |
22 | 15 |
|
23 | | -### Example 1: Get the function name from a script |
| 16 | +Documentation is published at [psmodule.io/Ast](https://psmodule.io/Ast/). |
24 | 17 |
|
25 | | -This example shows how to get the function name from a script. |
| 18 | +Use PowerShell help and command discovery for module details: |
26 | 19 |
|
27 | 20 | ```powershell |
28 | | -Get-AstFunctionName -Path 'Test-Me.ps1' |
29 | | -Test-Me |
| 21 | +Get-Command -Module Ast |
| 22 | +Get-Help <CommandName> -Examples |
30 | 23 | ``` |
31 | 24 |
|
32 | | -### Find more examples |
33 | | - |
34 | | -To find more examples of how to use the module, please refer to the [examples](examples) folder. |
35 | | - |
36 | | -Alternatively, you can use the Get-Command -Module 'This module' to find more commands that are available in the module. |
37 | | -To find examples of each of the commands you can use Get-Help -Examples 'CommandName'. |
38 | | - |
39 | 25 | ## Contributing |
40 | 26 |
|
41 | | -Coder or not, you can contribute to the project! We welcome all contributions. |
42 | | - |
43 | | -### For Users |
44 | | - |
45 | | -If you don't code, you still sit on valuable information that can make this project even better. If you experience that the |
46 | | -product does unexpected things, throw errors or is missing functionality, you can help by submitting bugs and feature requests. |
47 | | -Please see the issues tab on this project and submit a new issue that matches your needs. |
48 | | - |
49 | | -### For Developers |
50 | | - |
51 | | -If you do code, we'd love to have your contributions. Please read the [Contribution guidelines](CONTRIBUTING.md) for more information. |
52 | | -You can either help by picking up an existing issue or submit a new one if you have an idea for a new feature or improvement. |
53 | | - |
54 | | -## Tools |
55 | | - |
56 | | -- [lzybkr/ShowPSAst](https://github.com/lzybkr/ShowPSAst) |
| 27 | +Issues and pull requests are welcome. Please use the repository issue tracker to report bugs, request features, or discuss improvements. |
0 commit comments