1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

test pre-commit

This commit is contained in:
checktheroads
2021-01-03 11:05:56 -07:00
parent 441c62a783
commit 4d01b6adfb
2 changed files with 10 additions and 4 deletions

View File

@@ -1,8 +1,13 @@
#!/usr/bin/env bash
pwd
ls -lsah
$UI_DIR="hyperglass/ui"
cd hyperglass/ui
if git diff --cached --name-only | grep --quiet "$UI_DIR"
then
echo "No frontend files have changed, skipping pre-commit check..."
exit 0
fi
cd $UI_DIR
yarn typecheck

View File

@@ -8,6 +8,7 @@ const config = require(String(configFile));
const { NODE_ENV: env, _HYPERGLASS_URL_: envUrl } = config;
// testing
const devProxy = {
'/api/query/': { target: envUrl + 'api/query/', pathRewrite: { '^/api/query/': '' } },
'/images': { target: envUrl + 'images', pathRewrite: { '^/images': '' } },
@@ -31,7 +32,7 @@ app
// Set up the proxy.
if (dev && devProxy) {
Object.keys(devProxy).forEach(function(context) {
Object.keys(devProxy).forEach(function (context) {
server.use(proxyMiddleware(context, devProxy[context]));
});
}