#1个Golang live reload和task runner


Content

- ⭐️主要功能

- 💃 开始

- 📄 配置示例

- 📚 命令列表

- 🛠 支持和建议

- 😎 支持者和赞助商

Top Features

  • 高性能实时重装。
  • 同时管理多个项目。
  • 通过自定义扩展名和路径进行监视。
  • 支持所有Go命令。
  • 在不同的Go版本之间切换。
  • 项目的自定义环境变量。
  • 在文件更改前后或全局执行自定义命令。
  • 将日志和错误导出到外部文件。
  • Step-by-step项目初始化。
  • 重新设计的面板,显示生成错误、控制台输出和警告。
  • 有什么建议吗?推荐一个惊人的功能!🕺

Supporters


Quickstart

go get github.com/oxequa/realize

Commands List

Run Command

从项目/项目根执行:

$ realize start

它将创建一个。实现.yaml文件如果不存在,请将工作目录添加为项目并运行工作流。

start命令支持以下自定义参数:

--name="name"               -> Run by name on existing configuration
--path="realize/server"     -> Custom Path (if not specified takes the working directory name)
--generate                  -> Enable go generate
--fmt                       -> Enable go fmt
--test                      -> Enable go test
--vet                       -> Enable go vet
--install                   -> Enable go install
--build                     -> Enable go build
--run                       -> Enable go run
--server                    -> Enable the web server
--open                      -> Open web ui in default browser
--no-config                 -> Ignore an existing config / skip the creation of a new one

Some examples:

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

如果需要,可以为项目指定其他参数:

✅ $ realize start --path="/print/printer" --run yourParams --yourFlags // right
❌ $ realize start yourParams --yourFlags --path="/print/printer" --run // wrong

⚠️ 附加参数必须在params之后:💡 start命令可以在不生成配置文件(--no config)的情况下从其工作目录与项目一起使用。

Add Command

将项目添加到现有配置文件或创建新的项目。

$ realize add

💡 add支持与start命令相同的参数。

Init Command

此命令允许您创建自定义配置step-by-step。

$ realize init

💡 init是唯一支持对所有受支持选项进行完全自定义的命令。

Remove Command

按项目名称删除项目

$ realize remove --name="myname"

Color reference

💙 蓝色:项目的输出。💔 红色:错误。💜 或时代:更改的文件。💚 绿色:已成功完成操作。

Config sample

***不再有a.realize dir,只有一个。实现.yaml文件***

更多示例请检查:实现示例

settings:
    legacy:
        force: true             // force polling watcher instead fsnotifiy
        interval: 100ms         // polling interval
    resources:                  // files names
        outputs: outputs.log
        logs: logs.log
        errors: errors.log
server:
    status: false               // server status
    open: false                 // open browser at start
    host: localhost             // server host
    port: 5001                  // server port
schema:
- name: coin
  path: coin              // project path
  env:            // env variables available at startup
        test: test
        myvar: value
  commands:               // go commands supported
    vet:
        status: true
    fmt:
        status: true
        args:
        - -s
        - -w
    test:
        status: true
        method: gb test    // support different build tools
    generate:
        status: true
    install:
        status: true
    build:
        status: false
        method: gb build    // support differents build tool
        args:               // additional params for the command
        - -race
    run:
        status: true
  args:                     // arguments to pass at the project
  - --myarg
  watcher:
      paths:                 // watched paths
      - /
      ignore_paths:          // ignored paths
      - vendor
      extensions:                  // watched extensions
      - go
      - html
      scripts:
      - type: before
        command: echo before global
        global: true
        output: true
      - type: before
        command: echo before change
        output: true
      - type: after
        command: echo after change
        output: true
      - type: after
        command: echo after global
        global: true
        output: true
      errorOutputPattern: mypattern   //custom error pattern

支持和建议

💬 跟我们聊聊吧⭐️建议新功能

Backers

支持我们每月捐款,并帮助我们继续我们的活动。[成为支持者]

Sponsors

成为赞助商并在这里获得您的标志![成为赞助商]