Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

tooling: use cosmtrek/air for watch mode (#388)

Guilherme Oenning9b65b54d268f
diff --git a/.dockerignore b/.dockerignore
index ca4221422..bf26847d7 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -5,6 +5,5 @@ public
tests
data
output
-gin-bin
.git
cover.out
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 34912fb7c..15d2071d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,9 +8,6 @@ logs/
fider
fider.exe
-gin-bin
-gin-bin.exe
-gin-bin.exe~
.env
npm-debug.log
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3c4a4d6a0..1995856c9 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -20,7 +20,7 @@ Install the following tools:
- Go 1.10+ (https://golang.org/)
- Node.js 10+ (https://nodejs.org/)
- Docker (https://www.docker.com/)
-- github.com/codegangsta/gin (https://github.com/codegangsta/gin/)
+- cosmtrek/air (https://github.com/cosmtrek/air/)
To setup your development workspace:
diff --git a/Makefile b/Makefile
index f712fb85c..89682d3d1 100644
--- a/Makefile
+++ b/Makefile
@@ -39,8 +39,7 @@ e2e:
# Development
watch:
- rm -rf dist
- gin --buildArgs "-ldflags='-s -w -X main.buildtime=${BUILD_TIME}'" &
+ air -c air.conf &
npx webpack -w
run:
diff --git a/air.conf b/air.conf
new file mode 100644
index 000000000..167af1067
--- /dev/null
+++ b/air.conf
@@ -0,0 +1,22 @@
+# conf for [Air](https://github.com/cosmtrek/air) in TOML format
+
+root = "."
+tmp_dir = "tmp"
+
+[build]
+bin = "godotenv -f .env ./fider"
+cmd = "go build -o fider ."
+log = "server-errors.log"
+include_ext = ["go", "tpl", "tmpl", "html"]
+exclude_dir = ["public", "tmp", "vendor", "node_modules", "data", "tests", "output", "scripts", "dist"]
+delay = 500
+
+[log]
+time = false
+
+[color]
+main = "magenta"
+watcher = "cyan"
+build = "yellow"
+runner = "green"
+app = "white"
\ No newline at end of file