diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4929478..1fc86be 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -6,6 +6,12 @@ labels: "bug" assignees: "koddr" --- +**Required check list:** + +- [ ] I didn't find found in the Create Go App CLI repository's issues section similar bug. +- [ ] I understand, that the Create Go App CLI is Open Source and not-for-profit product. +- [ ] This is not about third-party project, framework, package or technology. + **My environment:** - OS (`uname -a`): diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index f28b3a5..65be23c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -6,6 +6,12 @@ labels: "feature" assignees: "koddr" --- +**Required check list:** + +- [ ] I didn't find found in the Create Go App CLI repository's issues section similar feature request. +- [ ] I understand, that the Create Go App CLI is Open Source and not-for-profit product. +- [ ] This is not about third-party project, framework, package or technology. + **Is your feature request related to a problem? Please describe.** diff --git a/.gitignore b/.gitignore index 7949867..84ba1de 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,10 @@ **/app/ **/build/ **/dist/ +**/cgapp-project/ # Tests +*.out **/tmp/ # Embed file diff --git a/LICENSE b/LICENSE index de869c5..c99aa2b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -186,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019-present Vic Shóstak (https://1wa.co) + Copyright 2020 Vic Shóstak (https://1wa.co) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 0bc07f3..44f872a 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@
Create Go App CLI -

Create a new production-ready project with backend (Golang), frontend (JavaScript, TypeScript)
and deploy automation (Ansible, Docker) by running one CLI command.

Focus on writing code! The CLI will take care of the rest.

+

Create a new production-ready project with backend (Golang), frontend (JavaScript, TypeScript)
and deploy automation (Ansible, Docker) by running one CLI command.

Focus on writing code and thinking of business-logic! The CLI will take care of the rest.

-

cli version go version go cover go report license

+

cli version go version go cover go report license

## ⚡️ [Quick start](https://create-go.app/quick-start/) -First of all, [download](https://golang.org/dl/) and install Go. Version `1.11` or higher is required. +First of all, [download](https://golang.org/dl/) and install **Go**. Version `1.11` or higher is required. Installation is done by using the [`go build`](https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies) command with `$GOPATH/bin`: @@ -16,16 +16,16 @@ Installation is done by using the [`go build`](https://golang.org/cmd/go/#hdr-Co go build -i -o $GOPATH/bin/cgapp github.com/create-go-app/cli ``` -Let's create a new project into `./app` folder with [Fiber](https://github.com/gofiber/fiber) as backend and [Nginx](https://nginx.org/) as web server: +Let's create a new project via **interactive console UI** (or **CUI**) into current folder: ```bash -cgapp create -p ./app -b fiber -w nginx +cgapp create ``` -Okay, it works! Now, you can deploy this project to a remote server or run on your local machine in isolated Docker containers. Go to the root project folder and type command: +Okay, it works! Now, you can run this project on your **local machine** or deploy to a **remote server**. Project works in isolated Docker containers and automates via Ansible playbook: ```bash -cgapp deploy -u john_doe --ask-become-pass +cgapp deploy ``` That's all you need to start! 🎉 @@ -40,6 +40,7 @@ Unfortunately, we are unable to include all helpful documentation to the `README - [CLI Installation](https://create-go.app/detailed-guides/installation/) - [Alternative installations](https://create-go.app/detailed-guides/installation/#alternative-installations) - [Understanding CLI commands and options](https://create-go.app/detailed-guides/commands-and-options/) + - [`init`](https://create-go.app/detailed-guides/commands-and-options/#init) - [`create`](https://create-go.app/detailed-guides/commands-and-options/#create) - [`deploy`](https://create-go.app/detailed-guides/commands-and-options/#deploy) - [Run project on your local machine](https://create-go.app/detailed-guides/run-on-local/) @@ -53,67 +54,159 @@ Unfortunately, we are unable to include all helpful documentation to the `README ## ⚙️ [Commands & Options](https://create-go.app/detailed-guides/commands-and-options/) -### `create` +### [`init`](https://create-go.app/detailed-guides/commands-and-options/#init) + +CLI command for generate a default `.cgapp.yml` config file in current folder: + +```bash +cgapp init +``` + +
+Generated config file + +
+ +```yaml +# Project config. +project: + # Backend for your project. + # (Required) + # String: `net/http`, `fiber`, `echo`, `gin` + # User template: supported, set to URL (without protocol), + # like `github.com/user/template` + - backend: fiber + # Frontend for your project. + # (Optional, to skip set to `none`) + # String: `react`, `react: