8000 GitHub - xuxueyun/realize: Go build system with file watchers, live reload and output streams. Run, build and watch file changes with custom paths
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
forked from oxequa/realize

Go build system with file watchers, live reload and output streams. Run, build and watch file changes with custom paths

License

Notifications You must be signed in to change notification settings

xuxueyun/realize

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Realize

GoDoc TeamCity CodeBetter AUR Join the chat at https://gitter.im/tockins/realize Go Report Card

Logo

A Go build system with file watchers, output streams and live reload. Run, build and watch file changes with custom paths

Preview

What's new

v1.1
  • Windows support - Moved to 1.2
  • Custom paths for the commands fast/add
  • Save output on a file
  • Before/After fields enabled
  • Web panel in material design (localhost:5000)

Features

  • Build, Install, Test, Fmt and Run at the same time
  • Live reload on file changes (re-build, re-install and re-run)
  • Watch custom paths
  • Watch specific file extensions
  • Multiple projects support
  • Output streams
  • Execution times
  • Highly customizable
  • Fast run

Installation and usage

  • Run this to get/install:

    $ go get github.com/tockins/realize
    
  • From project/projects root execute:

    $ realize add
    

    It will create a realize.config.yaml file if it doesn't exist already and adds the working directory as the project.

    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
    --path="server"         -> Custom Path, if not specified takes the working directory name    
    -
    8A45
    -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 (port :5000)
    --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
    

    Fast run launches a project from its working directory without a config file

    $ realize fast
    

    The fast command supports the following custom parameters:

    --path="server"         -> Custom Path, if not specified takes the working directory name 
    --build                 -> Enables the build   
    --test                  -> Enables the tests   
    --config                -> Take the defined settings if exist a config file  
    --no-bin                -> Disables the installation
    --no-run                -> Disables the run
    --no-fmt                -> Disables the fmt (go fmt)
    --no-server             -> Disables the web panel (port :5000)
    --open                  -> Open the web panel in a new browser window 
    

    The "fast" command supports addittional arguments as the "add" command.

    $ realize fast --no-run yourParams --yourFlags // correct
    
    $ realize fast yourParams --yourFlags --no-run // wrong
    
    $ realize fast --path="/Users/alessio/go/src/github.com/tockins/realize-examples/coin/"
    

Color reference

  • Blue: outputs of the project
  • Red: errors
  • Magenta: times or changed files
  • Green: successfully completed action

Config file example

  • For more examples check Realize Examples

    projects:
       - app_name: App One     -> name
         app_path: one         -> root path
         app_run: true         -> enable/disable go run (require app_bin)
         app_bin: true         -> enable/disable go install
         app_build: false      -> enable/disable go build
         app_fmt: true         -> enable/disable go fmt
         app_test: true        -> enable/disable go test
         app_params:           -> the project will be launched with these parameters
           - --flag1
           - param1
         app_watcher:
           preview: true       -> prints the observed files on startup
           paths:              -> paths to observe for live reload
           - /
           ignore_paths:       -> paths to ignore
           - vendor
           - bin
           exts:               -> file extensions to observe for live reload
           - .go
           output:             -> enable/disable the output destinations 
                 cli: true         -> cli output
                 file: true        -> creates an output file inside the project 
           
    

Next release

v1.2
  • Windows support
  • Go generate support
  • Web panel - watched file
  • Web panel - edit settings

Contacts

About

Go build system with file watchers, live reload and output streams. Run, build and watch file changes with custom paths

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%
0