Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
chore: better logs for scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai committed May 8, 2021
1 parent fff6e43 commit 8dedafd
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"cleanup": "prettier --write src --parser typescript",
"test": "jest --silent --runInBand",
"release": "sh scripts/release.sh",
"preinstall": "sh scripts/yarn.sh",
"prepare": "husky install"
},
"repository": {
Expand Down Expand Up @@ -76,6 +77,7 @@
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"ts-jest": "^26.4.2",
"typescript": "next"
"tslib": "^2.2.0",
"typescript": "^4.2.4"
}
}
10 changes: 9 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/sh
YELLOW_COLOR="\u001b[33m"
GREEN_COLOR="\033[0;32m"
RESET_COLOR="\u001b[39m"

printf "${YELLOW_COLOR}Checking for errors...${RESET_COLOR}\n"
source scripts/check.sh
printf "${GREEN_COLOR}No errors found.${RESET_COLOR}\n"
printf "${YELLOW_COLOR}Building distribution bundles...${RESET_COLOR}\n"
source scripts/build.sh
printf "\n\n\033[1;31m[!] \033[0;33mPlease run \033[0m\`\033[1;36mnp\033[0m\`\n\n"
printf "${GREEN_COLOR}Built distribution bundles.${RESET_COLOR}\n"
printf "${YELLOW_COLOR}Please run \`np\` manually to publish the package.${RESET_COLOR}"
8 changes: 8 additions & 0 deletions scripts/yarn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
YELLOW_COLOR="\u001b[33m"
RESET_COLOR="\u001b[39m"

if [[ $npm_execpath != *"yarn"* ]]; then
printf "${YELLOW_COLOR}This repository requires Yarn 1.x for scripts to work properly.${RESET_COLOR}\n\n"
exit 1
fi
13 changes: 9 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6465,6 +6465,11 @@ tslib@^1.8.1, tslib@^1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==

tslib@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c"
integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==

tsutils@^3.17.1:
version "3.21.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
Expand Down Expand Up @@ -6545,10 +6550,10 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typescript@next:
version "4.3.0-dev.20210506"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210506.tgz#65279fe5746ae4d82397f8ee82c16024e78e1e8c"
integrity sha512-91ypOFD5hHQrmldSns8/oIq9VZ0rpA/t5NC6M9b5ZLcUz6tSF66wDqIBs6fu/yOwvOd7oozYEEC5nuBfItMAsQ==
typescript@^4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==

unicode-canonical-property-names-ecmascript@^1.0.4:
version "1.0.4"
Expand Down

0 comments on commit 8dedafd

Please sign in to comment.