Coder Social home page Coder Social logo

liudng / dogo Goto Github PK

View Code? Open in Web Editor NEW
265.0 20.0 45.0 3.14 MB

Monitoring changes in the source file and automatically compile and run (restart).

License: Other

Go 100.00%
monitoring monitor-changes inotify filewatcher devops watchfolder file-watchers build-tool windows-api

dogo's Introduction

dogo

Build Status Coverage License

Monitoring changes in the source file and automatically compile and run (restart).

中文

Install

go get github.com/liudng/dogo

Create config

Here's a config file sample, save the file as dogo.json:

{
    "WorkingDir": "{GOPATH}/src/github.com/liudng/dogo/example",
    "SourceDir": [
        "{GOPATH}/src/github.com/liudng/dogo/example"
    ],
    "SourceExt": [".c", ".cpp", ".go", ".h"],
    "BuildCmd": "go build github.com/liudng/dogo/example",
    "RunCmd": "example.exe",
    "Decreasing": 1
}

WorkingDir: working directory, dogo will auto change to this directory.

SourceDir: the list of source directories.

SourceExt: monitoring file type.

BuildCmd: the command of build and compile.

RunCmd: the program (full) path.

Decreasing: Ignore the number of modifies, it's only start counting after build success. Now it's supported in linux and windows.

Start monitoring

type the command to start:

dogo

or, specify a config file with -c

dogo -c=/path/to/dogo.json

the path can contain {GOPATH}.

screen capture

windows screen

dogo's People

Contributors

g07cha avatar joakimsoderberg avatar liudng avatar vanishs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dogo's Issues

Exlude directories option

Is it possible to exclude certain directories? We have a node_modules directory and a vendor directory and these have a lot of files. Even putting a file extension as .go doensn't do much help.

use DelayTime instead of Decreasing

I use sublime to edit my file. After I press ctr+s, sublime will format my file and save it again.
dogo will get two modify events and trigger 2 build and run. (because my app is web, it will report port is used error)
If dogo delay 0.5 second to build and run, there will be no such issue.
Maybe we don't need decreasing but just increase DelayTime, then we will not ignore any change.

using with code generation causes looping behavior

In my project, I am using a Makefile that causes code generation. The build command, thus results in new .go files being created/changed, which triggers dogo to restart the build process, and now it starts looping. I think listening for changes should be paused until the build commend process exits.

Deleting source file causes infinite error

Hi, "dogo" is really simplifying my workflow, thank you guys for creating and maintaining this utility but one thing makes me sad sometimes.

Let's say I have the following scenario:

  1. Create new file(let's say "test.go")
  2. Start "dogo"
  3. Remove file

In result "dogo" will constantly log: stat %filepath%: no such file or directory and I need to restart in order to continue the auto build. I'm using the latest version on OS X El Capitan by the way.

Runcmd is launched with wrong working dir

Executable file should have working dir set to filepath.dir("[runcmd command]").
Why exist both "WorkingDir" and "SourceDir" if they must have the same value?
I use "go install" as build command and wouldn't want to switch to an arbitrary build.
(apart from issue it'a very useful utility)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.