fly

command module
v0.0.0-...-bc5243c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

README ΒΆ

GoReport GoDoc License


Golang live reload and task runner

This is a custom go module based on realize


- ⭐️ Top Features

- πŸ’ƒπŸ» Get started

- πŸ“„ Config sample

- πŸ“š Commands List

- πŸ›  Suggestions

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.
  • Any suggestion? Suggest an amazing feature! πŸ•ΊπŸ»

Quickstart

go install github.com/devypt/fly

Commands List

Run Command

From project/projects root execute:

$ fly start

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

start command supports the following custom parameters:

--name="name"               -> Run by name on existing configuration
--path="fly/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
--open                      -> Open web ui in default browser
--no-config                 -> Ignore an existing config / skip the creation of a new one

Some examples:

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

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

βœ… $ fly start --path="/print/printer" --run yourParams --yourFlags // right
❌ $ fly 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).

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 .fly dir, but only a .fly.yaml file ***

For more examples check: Fly Examples

settings:
    resources:                  // files names
        outputs: outputs.log
        logs: logs.log
        errors: errors.log
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

Suggestions

⭐️ Suggest a new Feature

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL