mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
test pre-commit
This commit is contained in:
@@ -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
|
||||
|
@@ -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]));
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user