en-US/about_Forge.Module.help.txt

TOPIC
    about_Forge.Module

SHORT DESCRIPTION

    Forge.Module - A Forge Generator for PowerShell modules

LONG DESCRIPTION

    This module contains Forge generators for PowerShell modules.
    New-ForgeModule generates a new module and New-ForgeModuleFunction generates a new
    function inside an already created module.

    The generator is still quite new (and probably a bit opinionated) parts of the structure
    come from the excelent https://github.com/devblackops/NetScaler module and quite a bit of
    the rest comes from another similar project https://github.com/PowerShell/Plaster

EXAMPLES

    The following commands should generate a module named `PoshTodo`:

        New-ForgeModule -Name PoshTodo -License MIT -Author Léa -Email lea@example.com

    Would create, in the current directory a scaffold for module `PoshTodo` with the following
    structure:

        ./PoshTodo
        ├── LICENSE
        ├── PoshTodo
        │   ├── PoshTodo.psd1
        │   └── PoshTodo.psm1
        ├── README.md
        └── Tests

    A skeleton function with associated Pester test file can then be generated by executing:

        cd PoshTodo
        New-ForgeModuleFunction -Name New-PoshTodo

    Which produces the following result:

        ./PoshTodo
        ├── LICENSE
        ├── PoshTodo
        │   ├── New-PoshTodo.ps1
        │   ├── PoshTodo.psd1
        │   └── PoshTodo.psm1
        ├── README.md
        └── Tests
            ├── Manifest.Tests.ps1
            └── New-PoshTodo.Tests.ps1

    Adding the `-Editor VSCode` parameter will generate workspace configuration files for the
    _Visual Studio Code_ editor. For instance, it will generate a list of task that allow to
    run tests and other lifecycle operations from inside the editor.

    Depending on your preferences the module can be generated with two different build systems
    (or none if you do not need or want one).

    To generate PSake integration:

        New-ForgeModule -Name PoshTodo -Build PSake

    To generate InvokeBuild integration:

        New-ForgeModule -Name PoshTodo -Build InvokeBuild

    With all options activated we get:

        New-ForgeModule -Name PoshTodo -License MIT -Author Léa -Email lea@example.com ``
            -Editor VSCode -Build PSake `
            -Description "A Powershell TODO list handler"

    Which would generate the following project:

        ./PoshTodo
        ├── LICENSE
        ├── PoshTodo
        │   ├── PoshTodo.psd1
        │   └── PoshTodo.psm1
        ├── README.md
        ├── ScriptAnalyzerSettings.psd1
        ├── Tests
        │   └── Manifest.Tests.ps1
        ├── build.ps1
        ├── build.psake.ps1
        └── build.settings.ps1
    
KEYWORDS
    Module, Code, Generator, Template

SEE ALSO

    about_Forge