ampache_react/hooks/pre-commit
Phyks (Lucas Verney) 2d9747482b Move to CSS modules
Also includes misc fixes

* Use CSS modules for all the CSS.
* Fix a bug in the filterbar which was not filtering anything.
* Fix a l10n issue in songs view.
* Update hook to clean build repo before running, preventing to push
dev built code.
* Update webpack build code.
2016-07-30 00:19:05 +02:00

23 lines
434 B
Plaintext
Executable File

# Get against which ref to diff
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit
exit 1
fi
js_files=$(git diff-index --name-only $against | grep -e ".jsx\?$" | grep -v "^app/dist")
# Nothing more to do if no JS files was committed
if [ -z "$js_files" ]
then
exit 0
fi
echo "Rebuilding dist JavaScript files…"
export NODE_ENV=production
npm run clean
npm run build
git add app/dist