kick

module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0

README

Github Actions Go Report Card License

Project Start - kick

Project Start kick is a cli tool to start a project using template boilerplates.

Quickstart

Add a set of variables that will be used in your project. Variables are stored in ~/.env. All the variables defined here are passed to templates along with all environment variables as .Env.$VARIABLE

~/.env

AUTHOR=First Last <first.last@somedomain.com>

Create a project that will be used as an example to generate go projects. Templates are rendered using Go's text/template

mkdir -p ~/kicks/kickgo

~/kicks/kickgo/AUTHORS

# kick:render <--- This modeline tells kick to render file as a template. Line is stripped out from output file.
{{.Env.AUTHOR}}

~/kicks/kickgo/README.md

# kick:render
# {{.Project.NAME}}

~/kicks/kickgo/.gitignore

# Vim
.*.swp

# Mac
.DS_Store

/vendor/

Add a binary

mkdir -p ~/kicks/kickgo/cmd/\{\{.Project.NAME\}\}
touch ~/kicks/kickgo/cmd/\{\{.Project.NAME\}\}/main.go 

~/kicks/kickgo/cmd/\{\{.Project.NAME\}\}/main.go

// kick:render
package main

import "fmt"

func main() {
    fmt.Println("Project {{.Project.NAME}}")
}

Add the following file ~/.kick.yml

templates:
    - name: goproject
      url: ~/kicks/kickgo

Create the project using go

kick start goproject ~/mynewproject

Git templates

cd ~/kicks/kickgo
git init
git add .
git commit -m "first commit"
git push --set-upstream git@github.com/owner/kickgo.git master

Modify ~/.kick.yml

templates:
    - name: goproject
      url: http://github.com/owner/kickgo.git

Start a new project with the recently checked in boilerplate

kick start goproject ~/myproject

Variables

Variables are either environment variables, variables defined in ~/.env or project variables.

To list available project variables run

kick list --vars

Directories

Path Synopsis
cmd
DO NOT EDIT THIS FILE.
DO NOT EDIT THIS FILE.
env
Package env holds environment variables used by the application.
Package env holds environment variables used by the application.
fflags
Package fflags enables featureflags using environment variables.
Package fflags enables featureflags using environment variables.
resources/ansicodes
Package ansicodes is a collection of ANSI escape sequences used to format text output.
Package ansicodes is a collection of ANSI escape sequences used to format text output.
resources/sync
Package sync synchronizes configuration between the database and corresponding file and synchronization of any downloads.
Package sync synchronizes configuration between the database and corresponding file and synchronization of any downloads.
services/search
Package search implements search functionality
Package search implements search functionality
settings
Package settings is a package that implements Dependency Injection through methods that create the options needed for structs to be created.
Package settings is a package that implements Dependency Injection through methods that create the options needed for structs to be created.
test

Jump to

Keyboard shortcuts

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