Merge .gitignore files + add hook to update server
authorBenjamin Auder <benjamin.auder@somewhere>
Sun, 9 Feb 2020 21:32:58 +0000 (22:32 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sun, 9 Feb 2020 21:32:58 +0000 (22:32 +0100)
.gitignore [new file with mode: 0644]
client/.gitignore [deleted file]
hooks/post-update.dist [new file with mode: 0755]
server/.gitignore [deleted file]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..0fafd87
--- /dev/null
@@ -0,0 +1,27 @@
+# Various files
+/hooks/post-update
+/server/db/vchess.sqlite
+/server/config/parameters.js
+/client/dist/
+/client/src/parameters.js
+
+# Dependency directories#
+node_modules/
+
+# Log files
+npm-debug.log*
+
+# Temp files
+*.swp
+*~
+
+# Optional npm cache directory
+.npm/
+
+# Optional eslint cache
+.eslintcache/
+
+# dotenv environment variables file
+.env
+.env.local
+.env.*.local
diff --git a/client/.gitignore b/client/.gitignore
deleted file mode 100644 (file)
index 92c9a5f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-.DS_Store
-node_modules
-/dist
-/src/parameters.js
-
-# local env files
-.env.local
-.env.*.local
-
-# Log files
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-
-# Editor directories and files
-.idea
-.vscode
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw*
-
-# next.js build output
-.next
diff --git a/hooks/post-update.dist b/hooks/post-update.dist
new file mode 100755 (executable)
index 0000000..41590ea
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+ssh user@server -t 'cd /path/to/vchess/client && git pull && npm run build'
diff --git a/server/.gitignore b/server/.gitignore
deleted file mode 100644 (file)
index aeb7c87..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-
-# Runtime data
-pids
-*.pid
-*.seed
-*.pid.lock
-
-# Temp files
-*.swp
-*~
-
-# Various files
-/db/vchess.sqlite
-/config/parameters.js
-/static/
-
-# Compiled binary addons (https://nodejs.org/api/addons.html)
-build/Release
-
-# Dependency directories
-node_modules/
-
-# Optional npm cache directory
-.npm
-
-# Optional eslint cache
-.eslintcache
-
-# Output of 'npm pack'
-*.tgz
-
-# Yarn Integrity file
-.yarn-integrity
-
-# dotenv environment variables file
-.env