Improve output for yarn integrity check

This commit is contained in:
Winnie Hellmann 2019-09-03 14:06:57 +00:00 committed by Kushal Pandya
parent bc26349b76
commit 015efb0f71
2 changed files with 12 additions and 1 deletions

View File

@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"check-dependencies": "yarn check --integrity",
"check-dependencies": "scripts/frontend/check_dependencies.sh",
"clean": "rm -rf public/assets tmp/cache/*-loader",
"dev-server": "NODE_OPTIONS=\"--max-old-space-size=3584\" nodemon -w 'config/webpack.config.js' --exec 'webpack-dev-server --config config/webpack.config.js'",
"eslint": "eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.vue .",

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
if ! yarn check --integrity 2>&1 > /dev/null
then
echo
echo " $(tput setaf 1)yarn check --integrity$(tput sgr0) failed!"
echo " Your dependencies probably don't match the yarn.lock file."
echo " Please run $(tput setaf 2)yarn install$(tput sgr0) and try again."
echo
exit 1
fi