new

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

README

new

Create configurable project templates.

new -h

> render custom templates
> 
> Usage:
>   new [template path] [destination path] [flags]
> 
> Examples:
> new templates/team-project .
> 
> Flags:
>   -h, --help      help for new
>       --version   version for new
Installation

Assuming you have Go installed:

go get github.com/anthonynsimon/new
Usage:
  1. Create a file or folder with your template.
  2. Add a .new.yaml file:
# examples/example-project/.new.yaml

version: '1'

description: Example codebase project template

params:
    - name: name
      prompt: What's the name for the project?
      required: true
      kind: string
    
    - name: deployment
      prompt: What kind of deployment should be included? 
      kind: enum
      required: true
      enum:
        - kubernetes
        - docker
        - ec2
  1. Template it at the destination directory.
new examples/example-project

> Example codebase project template

> What's the name for the project? my-new-project
> What kind of deployment should be included? ✔ kubernetes

> Rendering my-new-project
> Rendering my-new-project/Pipfile
> Rendering my-new-project/Pipfile.lock
> Rendering my-new-project/README.md
> Rendering my-new-project/bin
> Rendering my-new-project/bin/.gitkeep
> Rendering my-new-project/conf
> Rendering my-new-project/conf/local
> Rendering my-new-project/conf/local/app.yaml
> Rendering my-new-project/deploy
> Rendering my-new-project/deploy/.gitkeep
> Rendering my-new-project/deploy/deploy.yml
> Rendering my-new-project/docs
> Rendering my-new-project/docs/.gitkeep
> Rendering my-new-project/src
> Rendering my-new-project/src/.gitkeep

Done!

Contributing

To get started take a look at our contribution guidelines for information about our process and where you can fit in!

Changelog

You can check our changelog for information about releases.

License

See LICENSE.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL