examples updated

This commit is contained in:
alessio 2016-08-22 18:08:11 +02:00
parent 55ce5f2be4
commit 4bcaafa825

View File

@ -27,32 +27,33 @@ A Golang build system with file watchers, output streams and live reload. Run, b
#### Installation and usage #### Installation and usage
- Run this for get/install it: - Run this to get/install:
``` ```
$ go get github.com/tockins/realize $ go get github.com/tockins/realize
``` ```
- From the root of a project/projects: - From project/projects root execute:
``` ```
$ realize add $ realize add
``` ```
If not exists already, It will create a realize.config.yaml file. It will create a realize.config.yaml file if it doesn't exist already and adds the working directory as the project.
You can even pass custom parameters for add a project. This is a list of the supported fields: Otherwise if a config file already exists it adds another 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 --name="Project Name" -> Name, if not specified takes the working directory name
--path="server" -> Base Path, if not specified takes the working directory name --path="server" -> Base Path, if not specified takes the working directory name
--build -> Go build, if not specified takes "false" --build -> Enables the build
--bin -> Go intall, if not specified takes "true" --nobin -> Disables the installation
--run -> Go run, if not specified takes "true" --norun -> Disables the run
--fmt -> Go fmt, if not specified takes "true" --nofmt -> Disables the fmt (go fmt)
``` ```
Examples:
Add a project whenever you want.
``` ```
$ realize add $ realize add
@ -67,9 +68,9 @@ A Golang build system with file watchers, output streams and live reload. Run, b
$ realize add --name="My Project" --path="/projects/package" --build $ realize add --name="My Project" --path="/projects/package" --build
``` ```
``` ```
$ realize add --name="My Project" --path="projects/package" --build --run $ realize add --name="My Project" --path="projects/package" --build --norun
``` ```
- Remove a project by his name - Remove a project by its name
``` ```
$ realize remove --name="Project Name" $ realize remove --name="Project Name"
@ -79,26 +80,26 @@ A Golang build system with file watchers, output streams and live reload. Run, b
``` ```
$ realize list $ realize list
``` ```
- Build, Run and watch file changes. Realize will re-build and re-run your projects on each changes - Build, Run and watch file changes. Realize will re-build and re-run your projects on each change.
``` ```
$ realize run $ realize run
``` ```
Fast run launches a project from his working directory without a config file Fast run launches a project from its working directory without a config file
``` ```
$ realize fast $ realize fast
``` ```
You can use many additional parameters with this command The fast command supports the following custom parameters:
``` ```
--build -> Go build, if not specified takes "false" --build -> Enables the build
--bin -> Go intall, if not specified takes "true" --nobin -> Disables the installation
--run -> Go run, if not specified takes "true" --norun -> Disables the run
--fmt -> Go fmt, if not specified takes "true" --nofmt -> Disables the fmt (go fmt)
--config -> If there is a config file with a project for the current directory take that configuration --config -> Take the defined settings if exist a config file
``` ```
#### Config file example #### Config file example