项目作者: oxequa

项目描述 :
Realize是排名第一的Golang任务运行器,它通过自动执行最常见的任务并使用性能最佳的Golang实时重新加载来增强您的工作流程。
高级语言: Go
项目地址: git://github.com/oxequa/realize.git
创建时间: 2016-07-12T08:07:25Z
项目社区:https://github.com/oxequa/realize

开源协议:GNU General Public License v3.0

下载






Build status
GoReport
GoDoc
License
Gitter




#1 Golang live reload and task runner







Content

- ⭐️ Top Features

- 💃🏻 Get started

- 📄 Config sample

- 📚 Commands List

- 🛠 Support and Suggestions

- 😎 Backers and Sponsors

Top Features

  • High performance Live Reload.
  • Manage multiple projects at the same time.
  • Watch by custom extensions and paths.
  • All Go commands supported.
  • Switch between different Go builds.
  • Custom env variables for project.
  • Execute custom commands before and after a file changes or globally.
  • Export logs and errors to an external file.
  • Step-by-step project initialization.
  • Redesigned panel that displays build errors, console outputs and warnings.
  • Any suggestion? Suggest an amazing feature! 🕺🏻

Supporters




Quickstart

  1. go get github.com/oxequa/realize

Commands List

Run Command

From project/projects root execute:

  1. $ realize start

It will create a .realize.yaml file if doesn’t already exist, add the working directory as project and run your workflow.

start command supports the following custom parameters:

  1. --name="name" -> Run by name on existing configuration
  2. --path="realize/server" -> Custom Path (if not specified takes the working directory name)
  3. --generate -> Enable go generate
  4. --fmt -> Enable go fmt
  5. --test -> Enable go test
  6. --vet -> Enable go vet
  7. --install -> Enable go install
  8. --build -> Enable go build
  9. --run -> Enable go run
  10. --server -> Enable the web server
  11. --open -> Open web ui in default browser
  12. --no-config -> Ignore an existing config / skip the creation of a new one

Some examples:

  1. $ realize start
  2. $ realize start --path="mypath"
  3. $ realize start --name="realize" --build
  4. $ realize start --path="realize" --run --no-config
  5. $ realize start --install --test --fmt --no-config
  6. $ realize start --path="/Users/username/go/src/github.com/oxequa/realize-examples/coin/"

If you want, you can specify additional arguments for your project:

  1. $ realize start --path="/print/printer" --run yourParams --yourFlags // right
  2. $ realize start yourParams --yourFlags --path="/print/printer" --run // wrong

⚠️ The additional arguments must go after the params:


💡 The start command can be used with a project from its working directory without make a config file (—no-config).

Add Command

Add a project to an existing config file or create a new one.

  1. $ realize add

💡 add supports the same parameters as start command.

Init Command

This command allows you to create a custom configuration step-by-step.

  1. $ realize init

💡 init is the only command that supports a complete customization of all supported options.

Remove Command

Remove a project by its name

  1. $ realize remove --name="myname"

Color reference

💙 BLUE: Outputs of the project.

💔 RED: Errors.

💜 PURPLE: Times or changed files.

💚 GREEN: Successfully completed action.

Config sample

there is no more a .realize dir, but only a .realize.yaml file

For more examples check: Realize Examples

  1. settings:
  2. legacy:
  3. force: true // force polling watcher instead fsnotifiy
  4. interval: 100ms // polling interval
  5. resources: // files names
  6. outputs: outputs.log
  7. logs: logs.log
  8. errors: errors.log
  9. server:
  10. status: false // server status
  11. open: false // open browser at start
  12. host: localhost // server host
  13. port: 5001 // server port
  14. schema:
  15. - name: coin
  16. path: coin // project path
  17. env: // env variables available at startup
  18. test: test
  19. myvar: value
  20. commands: // go commands supported
  21. vet:
  22. status: true
  23. fmt:
  24. status: true
  25. args:
  26. - -s
  27. - -w
  28. test:
  29. status: true
  30. method: gb test // support different build tools
  31. generate:
  32. status: true
  33. install:
  34. status: true
  35. build:
  36. status: false
  37. method: gb build // support differents build tool
  38. args: // additional params for the command
  39. - -race
  40. run:
  41. status: true
  42. args: // arguments to pass at the project
  43. - --myarg
  44. watcher:
  45. paths: // watched paths
  46. - /
  47. ignore_paths: // ignored paths
  48. - vendor
  49. extensions: // watched extensions
  50. - go
  51. - html
  52. scripts:
  53. - type: before
  54. command: echo before global
  55. global: true
  56. output: true
  57. - type: before
  58. command: echo before change
  59. output: true
  60. - type: after
  61. command: echo after change
  62. output: true
  63. - type: after
  64. command: echo after global
  65. global: true
  66. output: true
  67. errorOutputPattern: mypattern //custom error pattern

Support and Suggestions

💬 Chat with us Gitter

⭐️ Suggest a new Feature

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]




Sponsors

Become a sponsor and get your logo here! [Become a sponsor]