All Projects → maxcnunes → gaper

maxcnunes / gaper

Licence: MIT license
Builds and restarts a Go project when it crashes or some watched file changes

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to gaper

Jus
🍉 An opinionated tool for making static websites with browserify
Stars: ✭ 107 (+72.58%)
Mutual labels:  livereload
Kirby Webpack
💪 A Kirby CMS starter-kit with modern frontend tools
Stars: ✭ 150 (+141.94%)
Mutual labels:  livereload
pribambase
Paint pixelart textures in real time in Blender with Aseprite.
Stars: ✭ 129 (+108.06%)
Mutual labels:  livereload
Simple Boilerplate
A simple webpack boilerplate for your comfortable work with HTML, JS and CSS.
Stars: ✭ 116 (+87.1%)
Mutual labels:  livereload
Gosora
Gosora is an ultra-fast and secure forum software written in Go that balances usability with functionality.
Stars: ✭ 131 (+111.29%)
Mutual labels:  livereload
Webpack Livereload Plugin
LiveReload during webpack --watch
Stars: ✭ 183 (+195.16%)
Mutual labels:  livereload
Devreload
Auto reload for ASP.NET core development
Stars: ✭ 66 (+6.45%)
Mutual labels:  livereload
live-reload-vanilla-website-template
Template to build a website without a front-end framework, including transpilation of ES6+ JavaScript and Sass support
Stars: ✭ 47 (-24.19%)
Mutual labels:  livereload
Blazorlivereload
BlazorLiveReload
Stars: ✭ 143 (+130.65%)
Mutual labels:  livereload
magento-2-gulp
Gulp for Magento 2. It works with core Magento styles (less) and structure. Uses default theme configs from dev/tools/grunt/configs/local-themes.js.
Stars: ✭ 37 (-40.32%)
Mutual labels:  livereload
Flexlib
FlexLib是一个基于flexbox模型,使用xml文件进行界面布局的框架,融合了web快速布局的能力,让iOS界面开发像写网页一样简单快速
Stars: ✭ 1,569 (+2430.65%)
Mutual labels:  livereload
Tychus
Command line utility to live-reload your application.
Stars: ✭ 124 (+100%)
Mutual labels:  livereload
Vscode Live Server
Launch a development local Server with live reload feature for static & dynamic pages.
Stars: ✭ 3,275 (+5182.26%)
Mutual labels:  livereload
Fuzzymail
📨 Email template generator. Making emails fun again.
Stars: ✭ 114 (+83.87%)
Mutual labels:  livereload
universal-hot-reload
Hot reload client and server webpack bundles for the ultimate development experience
Stars: ✭ 79 (+27.42%)
Mutual labels:  livereload
Boot Reload
Boot task providing live-reload of browser css, images, etc.
Stars: ✭ 90 (+45.16%)
Mutual labels:  livereload
Modd
A flexible developer tool that runs processes and responds to filesystem changes
Stars: ✭ 2,030 (+3174.19%)
Mutual labels:  livereload
biu
⚡ a simple front-end code livereload tool
Stars: ✭ 26 (-58.06%)
Mutual labels:  livereload
fast-laravel
基于Swoole的高性能HTTP服务器,加速您Laravel应用程序。
Stars: ✭ 33 (-46.77%)
Mutual labels:  restart-server
P5 Manager
A p5js template builder & sketches manager. Built for p5js enthusiasts.
Stars: ✭ 251 (+304.84%)
Mutual labels:  livereload

gaper

Used to build and restart a Go project when it crashes or some watched file changes
Aimed to be used in development only.


Software License Linux - Build Status Windows - Build status Coverage Status Go Doc Go Report Card Powered By: GoReleaser

Changelog

See Releases for detailed history changes.

Installation

Using go tooling:

go get -u github.com/maxcnunes/gaper/cmd/gaper

Or, downloading the binary instead (example for version 1.0.3, make sure you are using the latest version though):

curl -SL https://github.com/maxcnunes/gaper/releases/download/v1.0.3/gaper_1.0.3_linux_amd64.tar.gz | tar -xvzf - -C "${GOPATH}/bin"

Usage

NAME:
   gaper - Used to build and restart a Go project when it crashes or some watched file changes

USAGE:
   gaper [global options] command [command options] [arguments...]

VERSION:
   version

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --bin-name value                 name for the binary built by gaper for the executed program (default current directory name)
   --build-path value               path to the program source code (default: ".")
   --build-args value               arguments used on building the program
   --program-args value             arguments used on executing the program
   --verbose                        turns on the verbose messages from gaper
   --disable-default-ignore         turns off default ignore for hidden files and folders, "*_test.go" files, and vendor folder
   --watch value, -w value          list of folders or files to watch for changes
   --ignore value, -i value         list of folders or files to ignore for changes
   --poll-interval value, -p value  how often in milliseconds to poll watched files for changes (default: 500)
   --extensions value, -e value     extensions to watch for changes (default: "go")
   --no-restart-on value, -n value  don't automatically restart the supervised program if it ends:
                                      if "error", an exit code of 0 will still restart.
                                      if "exit", no restart regardless of exit code.
                                      if "success", no restart only if exit code is 0.
   --help, -h                       show help
   --version, -v                    print the version

Watch and Ignore paths

For those options Gaper supports static paths (e.g. build/, seed.go) or glob paths (e.g. migrations/**/up.go, *_test.go).

On using a path to a directory please add a / at the end (e.g. build/) to make sure Gaper won't include other matches that starts with that same value (e.g. build/, build_settings.go).

Default ignore settings

Since in most projects there is no need to watch changes of:

  • hidden files and folders
  • test files (*_test.go)
  • vendor folder

Gaper by default ignores those cases already. Although, if you need Gaper to watch those files anyway it is possible to disable this setting with --disable-default-ignore argument.

Watch method

Currently Gaper uses polling to watch file changes. We have plans to support fs events though in a near future.

Examples

Using all defaults provided by Gaper:

gaper

Example providing a few custom configurations:

gaper \
	--bin-name build/api-dev \
	--build-path cmd/server \
	--build-args "-ldflags=\"-X 'main.Version=dev'" \
	-w 'public/**' -w '*.go' \
	-e js -e css -e html \
	--watch .

Example to ignore watching over all test files:

no need for this if you have not disabled the default ignore settings --disable-default-ignore

--ignore './**/*_test.go'

Contributing

See the Contributing guide for steps on how to contribute to this project.

Reference

This package was heavily inspired by gin and node-supervisor.

Basically, Gaper is a mixing of those projects above. It started from gin code base and I rewrote it aiming to get something similar to node-supervisor (but simpler). A big thanks for those projects and for the people behind it! 👏👏

How is Gaper different of Gin

The main difference is that Gaper removes a layer of complexity from Gin which has a proxy running on top of the executed server. It allows to postpone a build and reload the server when the first call hits it. With Gaper we don't care about that feature, it just restarts your server whenever a change is made.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].