Skip to content

get template from git #272

Closed
Closed

Description

@trondhindenes

It would be great if Plaster natively supported git-based templates (something like git:https://github.com/trondhindenes/plastertemplate1.git so that the template content was disconnected from the module itself - would require some convention around how to store stuff in a git repo in a way that Plaster would understand (esp content files etc)

Activity

  1. MartinSGill commented on Oct 24, 2019

    @MartinSGill
    Contributor

    I've pretty much written a Plaster module in this manner already.

    As long as the conventions of a plaster template are followed as already documented, it's very easy to treat a repository as a template. It even works right now, with a couple of manual steps.

    git clone --depth 1 https://github.com/SomeUser/SomeTemplate
    Invoke-Plaster -TemplatePath .\SomeTemplate -DestinationPath PathToNewModule

    To implement this in Plaster all you'd really need, if I quickly think about it, is

    • A new Parameter (e.g. -GitHub [URL | User/Repo] )
    • A place to cache the clone, e.g. ProgramData/Plaster

    Extra credit for:

    • Keeping the clone up-to-date
    • Error handling around git not being available
  2. locked and limited conversation to collaborators on Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions