git-templates

GIT Templates for repositories

View on GitHub

Introduction

Package Version Dependency Status

GIT Templates for repositories.

Usage

To run the utility, Node.js version 7 or above is required.

Install the package (only needed once):

npm install -g git-templates

Then, to install a template in the current folder:

git-templates [TEMPLATE] [CONFIGURATION]

Where:

  • TEMPLATE: Is the name of the template, like node-app.

    To see all the available templates, run:

    git-templates -l
    
  • CONFIGURATION: A path to JSON file with values for the following fields:

    • name: The name of the project. Defaults to the basename of the current directory.
    • namespace: The main module/namespaced of the project. Default is titleized version of name.
    • env: The name of a env variables namespace. Default is uppercased and underscorized version of name.
    • year (current_year): The current year for copyright notices. Default is the current year.
    • author: Author of the project. Default is Shogun.
    • authorEmail: Author's email. Default is shogun@cowtech.it.
    • githubUser: GitHub username of the author. Default is ShogunPanda.
    • repository: GitHub repository where download templates from. Default is ShogunPanda/git-templates.
    • summary: Short description of the project.
    • description: Long description of the project. Defaults to summary.
    • url: URL of the main page for the project. Defaults to https://github.com/{{githubUser}}/{{name}}.
    • docsUrl: URL of the main page for the project. Defaults to https://{{githubUser}}.github.io/{{name}}.

    This will default to the .git-template.json in the current folder.

To use authenticated API calls, provide the GITHUB_AUTH variable in the form $USER:$PASSWORD or $USER:$PERSONAL_ACCESS_TOKEN.

Made by a proud Italian!