forked from mirrors/thatmattlove-hyperglass
test pre-commit
This commit is contained in:
parent
441c62a783
commit
4d01b6adfb
2 changed files with 10 additions and 4 deletions
|
|
@ -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]));
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue