doc improved
This commit is contained in:
parent
cdb6dc030b
commit
5375d518d1
217
README.md
217
README.md
|
@ -17,112 +17,96 @@ A Go build system with file watchers, output streams and live reload. Run, build
|
||||||
#### Features
|
#### Features
|
||||||
|
|
||||||
- Highly customizable
|
- Highly customizable
|
||||||
|
- Config your project Step by Step
|
||||||
- Build, Install, Test, Fmt, Generate and Run at the same time
|
- Build, Install, Test, Fmt, Generate and Run at the same time
|
||||||
- Live reload on file changes (re-build, re-install...)
|
- Live reload on file changes (re-build, re-install...)
|
||||||
- Watch custom paths and specific file extensions
|
- Watch custom paths and specific file extensions
|
||||||
|
- Watch by FsNotify or by polling
|
||||||
- Support for multiple projects
|
- Support for multiple projects
|
||||||
- Output streams and error logs (Watch them in console or save them on a file)
|
- Output streams and error logs (support for save on a file)
|
||||||
- Web Panel (Watch all projects, edit the config settings, download each type of log)
|
- Web Panel (projects list, config settings, logs)
|
||||||
|
|
||||||
#### Installation and usage
|
#### Wiki
|
||||||
|
|
||||||
- Run this to get/install:
|
- [Getting Started](#installation-and-usage)
|
||||||
|
- [Run cmd](#run) - Run a project
|
||||||
|
- [Add cmd](#add) - Add a new project
|
||||||
|
- [Init cmd](#init) - Make a custom config step by step
|
||||||
|
- [Remove cmd](#remove) - Remove a project
|
||||||
|
- [List cmd](#list) - List the projects
|
||||||
|
- [Config sample](#config-sample)
|
||||||
|
|
||||||
|
|
||||||
|
##### Installation
|
||||||
|
Run this to get/install:
|
||||||
```
|
```
|
||||||
$ go get github.com/tockins/realize
|
$ go get github.com/tockins/realize
|
||||||
```
|
```
|
||||||
|
#### Commands
|
||||||
|
|
||||||
- From project/projects root execute:
|
##### Run
|
||||||
|
From project/projects root execute:
|
||||||
```
|
|
||||||
$ realize add
|
|
||||||
```
|
|
||||||
|
|
||||||
It will create a realize.yaml file if it doesn't exist already and adds the working directory as project.
|
|
||||||
|
|
||||||
Otherwise if a config file already exists it adds the working project to the existing config file.
|
|
||||||
|
|
||||||
The Add command supports the following custom parameters:
|
|
||||||
|
|
||||||
```
|
|
||||||
--name="Project Name" -> Name, if not specified takes the working directory name
|
|
||||||
--path="server" -> Custom Path, if not specified takes the working directory name
|
|
||||||
--build -> Enables the build
|
|
||||||
--test -> Enables the tests
|
|
||||||
--no-bin -> Disables the installation
|
|
||||||
--no-run -> Disables the run
|
|
||||||
--no-fmt -> Disables the fmt (go fmt)
|
|
||||||
--no-server -> Disables the web panel (default port 5001)
|
|
||||||
--open -> Open the web panel in a new browser window
|
|
||||||
```
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ realize add
|
|
||||||
|
|
||||||
$ realize add --path="mypath"
|
|
||||||
|
|
||||||
$ realize add --name="My Project" --build
|
|
||||||
|
|
||||||
$ realize add --name="My Project" --path="/projects/package" --build
|
|
||||||
|
|
||||||
$ realize add --name="My Project" --path="projects/package" --build --no-run
|
|
||||||
|
|
||||||
$ realize add --path="/Users/alessio/go/src/github.com/tockins/realize-examples/coin/"
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want, you can specify additional arguments for your project.
|
|
||||||
|
|
||||||
**The additional arguments must go after the options of "Realize"**
|
|
||||||
|
|
||||||
```
|
|
||||||
$ realize add --path="/print/printer" --no-run yourParams --yourFlags // correct
|
|
||||||
|
|
||||||
$ realize add yourParams --yourFlags --path="/print/printer" --no-run // wrong
|
|
||||||
```
|
|
||||||
|
|
||||||
- Remove a project by its name
|
|
||||||
|
|
||||||
```
|
|
||||||
$ realize remove --name="Project Name"
|
|
||||||
```
|
|
||||||
- Lists all projects
|
|
||||||
|
|
||||||
```
|
|
||||||
$ realize list
|
|
||||||
```
|
|
||||||
- Build, Run and watch file changes. Realize will re-build and re-run your projects on each change.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ realize run
|
$ realize run
|
||||||
```
|
```
|
||||||
|
|
||||||
Run can also launch a project from its working directory with or without make a config file (--no-config option).
|
It will create a realize.yaml file if it doesn't exist already, adds the working directory as project and run the pipeline.
|
||||||
It supports the following custom parameters:
|
|
||||||
|
The Run command supports the following custom parameters:
|
||||||
|
|
||||||
```
|
```
|
||||||
--path="server" -> Custom Path, if not specified takes the working directory name
|
--path="realize/server" -> Custom Path, if not specified takes the working directory name
|
||||||
--build -> Enables the build
|
--build -> Enable go build
|
||||||
--test -> Enables the tests
|
--no-run -> Disable go run
|
||||||
--config -> Take the defined settings if exist a config file
|
--no-install -> Disable go install
|
||||||
--no-bin -> Disables the installation
|
--no-config -> Ignore an existing config / skip the creation of a new one
|
||||||
--no-run -> Disables the run
|
--server -> Enable the web server
|
||||||
--no-fmt -> Disables the fmt (go fmt)
|
--legacy -> Enable legacy watch instead of Fsnotify watch
|
||||||
--no-server -> Disables the web panel (port :5000)
|
--generate -> Enable go generate
|
||||||
--no-config -> Doesn't create any configuration files
|
--test -> Enable go test
|
||||||
--open -> Open the web panel in a new browser window
|
|
||||||
--port -> Sets the web panel port
|
|
||||||
```
|
```
|
||||||
And additional arguments as the "add" command.
|
Examples:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ realize run --no-run yourParams --yourFlags // correct
|
$ realize run
|
||||||
|
$ realize run --path="mypath"
|
||||||
$ realize run yourParams --yourFlags --no-run // wrong
|
$ realize run --name="My Project" --build
|
||||||
|
$ realize run --path="realize" --no-run --no-config
|
||||||
$ realize run --path="/Users/alessio/go/src/github.com/tockins/realize-examples/coin/"
|
$ realize run --path="/Users/alessio/go/src/github.com/tockins/realize-examples/coin/"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want, you can specify additional arguments for your project.
|
||||||
|
|
||||||
|
**The additional arguments must go after the params**
|
||||||
|
|
||||||
|
**Run can run a project from its working directory without make a config file (--no-config).**
|
||||||
|
|
||||||
|
```
|
||||||
|
$ realize run --path="/print/printer" --no-run yourParams --yourFlags // right
|
||||||
|
$ realize run yourParams --yourFlags --path="/print/printer" --no-run // wrong
|
||||||
|
```
|
||||||
|
##### Add
|
||||||
|
|
||||||
|
Add a project to an existing config file or create a new one without run the pipeline.
|
||||||
|
|
||||||
|
"Add" supports the same parameters of the "Run" command.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ realize add
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Remove
|
||||||
|
Remove a project by its name
|
||||||
|
```
|
||||||
|
$ realize remove --name="myname"
|
||||||
|
```
|
||||||
|
|
||||||
|
##### List
|
||||||
|
Projects list in cli
|
||||||
|
```
|
||||||
|
$ realize list
|
||||||
|
```
|
||||||
|
|
||||||
#### Color reference
|
#### Color reference
|
||||||
|
|
||||||
- Blue: outputs of the project
|
- Blue: outputs of the project
|
||||||
|
@ -131,46 +115,53 @@ A Go build system with file watchers, output streams and live reload. Run, build
|
||||||
- Green: successfully completed action
|
- Green: successfully completed action
|
||||||
|
|
||||||
|
|
||||||
#### Config file example
|
#### Config sample
|
||||||
|
|
||||||
- For more examples check [Realize Examples](https://github.com/tockins/realize-examples)
|
- For more examples check [Realize Examples](https://github.com/tockins/realize-examples)
|
||||||
|
|
||||||
```
|
```
|
||||||
flimit: 15000 // Alters the default maximum number of open files
|
settings:
|
||||||
|
legacy:
|
||||||
|
status: true // legacy watch status
|
||||||
|
interval: 10s // polling interval
|
||||||
|
resources: // files names related to streams
|
||||||
|
outputs: outputs.log
|
||||||
|
logs: logs.log
|
||||||
|
errors: errors.log
|
||||||
server:
|
server:
|
||||||
status: true // Disable/Enable the server
|
status: true // server status
|
||||||
host: localhost // Defines the server address
|
open: false // auto open in browser on start
|
||||||
port: 5001 // Defines the server port
|
host: localhost // server host
|
||||||
open: true // Opens the server in a new browser tab
|
port: 5001 // server port
|
||||||
resources:
|
|
||||||
logs: logs.log // Save the logs on the defined file, disabled if removed
|
|
||||||
outputs: outputs.log // Save the outputs on the defined file, disabled if removed
|
|
||||||
errors: errors.log // Save the errors on the defined file, disabled if removed
|
|
||||||
projects:
|
projects:
|
||||||
- name: realize // Project name
|
- name: realize
|
||||||
path: . // Project path
|
path: . // project path
|
||||||
fmt: true // Disable/Enable go ftm
|
fmt: true
|
||||||
test: false // Disable/Enable go test
|
generate: false
|
||||||
generate: false // Disable/Enable go generate
|
test: false
|
||||||
bin: true // Disable/Enable go install
|
bin: true
|
||||||
build: false // Disable/Enable go build
|
build: false
|
||||||
run: false // Disable/Enable go run
|
run: false
|
||||||
streams: true // Enable/Disable the output streams in cli
|
params: // additional params
|
||||||
params: [] // Run the project with defined additional params
|
- --myarg
|
||||||
watcher:
|
watcher:
|
||||||
preview: false // Enable/Disable the preview of the watched files
|
preview: false // wached files preview
|
||||||
paths: // Paths to watch, sub-paths included
|
paths: // paths to watch
|
||||||
- /
|
- /
|
||||||
ignore_paths: // Paths ignored
|
ignore_paths: // paths to ignore
|
||||||
- vendor
|
- vendor
|
||||||
exts: // File extensions to watch
|
exts: // exts to watch
|
||||||
- .go
|
- .go
|
||||||
commands: // Additional commands to run after and before
|
scripts: // custom commands after/before
|
||||||
- before: go install // Defines if after or before
|
- type: after // type after/before
|
||||||
- before: golint
|
command: go run mycmd after // command
|
||||||
watched: true // Run the command with all watched paths
|
path: "" // run from a custom path or from the working dir
|
||||||
foreach: true // Run the command at each reload
|
streams: // enable/disable streams
|
||||||
- after: cd server && gobindata
|
cli_out: true
|
||||||
|
file_out: false
|
||||||
|
file_log: false
|
||||||
|
file_err: false
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Next features, in progress...
|
#### Next features, in progress...
|
||||||
|
|
Loading…
Reference in New Issue