0.1.0 • Published 2 years ago
fromgit v0.1.0
fromgit
Inspired by degit, cargo generate, and yeoman fromgit allows you to use git repositories as templates for new projects.
Installation
$ npm install -g fromgitUsage
$ fromgit <git-url> <destination directory> [--silent] [--branch=...]Templates
Use a .template file in your project's root to define variables that fromgit will prompt a user for. Files included in the templates list will be processed as ejs templates with the user's input.
name: Boilerplate project
description: Description for this project
templates:
- my-template.md
variables:
- name: name
message: Enter the project name
initial: My Awesome Project!
- name: description
message: What's your project's description?Example my-template.md
## <%- name %>
<%- description %>Environment variables & silent operation
fromgit will look for environment variables that look like FROMGIT_[variable name] to populate the initial values in the template. If you pass --silent to fromgit then you can automatically populate projects without interactive prompts.
License
MIT