Skip to content

Plaster Use Cases #8

@rkeithhill

Description

@rkeithhill

I wanted to start a thread here where folks can see our initial list of use cases. Propose others for debate and eventually wind up with a set of supported use cases for the initial release. Here is the set of use cases I have been working off of for the preview.

  1. Create files for the user.
    This may be an empty PSM1 file or an about_${ModuleName}.help.txt file with some boiler plate text in it or a module manifest file filled in with information gathered from the user.
  2. Create folders where necessary to provide required (or desired) structure.
    For instance, projects targeting VSCode that supply tasks.json file need to put that file in a .vscode directory and if that directory doesn't exist, it needs to be created. Similarly a module manifest Pester test might go in a Tests folder.
  3. Modify existing files.
    Templates are just for initial project scaffolding. You can use them throughout project (module/dsc resource) development to: Add a new DSC resource or add PSake build support to a pre-existing module. Some additions might require modifications to existing files, like adding a new task to the VSCode tasks.json file.

I know some folks have wanted arbitrary code execution. This is something we're currently going out of our way to prevent. We want users who are expecting "scaffolding" i.e. the creation of files & folders, to be able to trust that the template isn't do something else. In fact, I haven't implemented it yet but I'd like for a user to be able to trust that the template will not modify anything outside of the DestinationPath they've specified. That said, if there are important use cases we're giving up, I'd like to know.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions