diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-10-29 01:33:52 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-10-29 01:33:52 +0800 |
| commit | f90f7313bb3ff6c3a28f6a1845936d2ba05981c4 (patch) | |
| tree | ad9f667dd6ddff62b5336bdedce89edd180ac4e7 /launch.sh | |
| parent | 1298abd3377cc79d8883bb6e38b65bca46f0c8d7 (diff) | |
added function build() and watch()
Diffstat (limited to 'launch.sh')
| -rwxr-xr-x | launch.sh | 45 |
1 files changed, 27 insertions, 18 deletions
@@ -1,37 +1,46 @@ function check() { - printf '\033[0;35mCode Checking Starts...\033[0m\n' - html5validator --also-check-css --also-check-svg --verbose | npx gnomon || printf '\033[0;31mCode Check Failed...\033[0m\n' - # sleep .5 - echo - htmltest --conf ./.htmltest.yml | npx gnomon || printf '\033[0;31mCode Check Failed...\033[0m\n' - # sleep .5 + printf '\033[0;35mCode Checking Starts...\033[0m\n' + html5validator --also-check-css --also-check-svg --verbose | npx gnomon || printf '\033[0;31mCode Check Failed...\033[0m\n' + # sleep .5 + echo + htmltest --conf ./.htmltest.yml | npx gnomon || printf '\033[0;31mCode Check Failed...\033[0m\n' + # sleep .5 } function buildcss() { - printf '\033[0;35mCode CSS Build Starts...\033[0m\n' - yarn build:css || printf '\033[0;31mCode CSS Build Failed...\033[0m\n' + printf '\033[0;35mCode CSS Build Starts...\033[0m\n' + yarn build:css || printf '\033[0;31mCode CSS Build Failed...\033[0m\n' } function buildjs() { - printf '\033[0;35mCode JavaScript Compile Starts...\033[0m\n' - yarn build:js || printf '\033[0;31mCode JavaScript Compile Failed...\033[0m\n' + printf '\033[0;35mCode JavaScript Compile Starts...\033[0m\n' + yarn build:js || printf '\033[0;31mCode JavaScript Compile Failed...\033[0m\n' +} + +function build() { + printf '\033[0;35mStart Building/Compiling...\033[0m\]' + yarn build || printf '\033[0;31mBuilding/Compiling Failed..\033[0m\n' +} + +function watch() { + printf '\033[0;35mStart Watching.. \033[0m\n' + yarn watch || printf '\033[0;31mWatch Failed...\033[0m\n' } function start() { - printf '\033[0;32mNpx Server Starting...\033[0m\n' - exec npx serve -d -p 209 #| npx gnomon; + printf '\033[0;32mNpx Server Starting...\033[0m\n' + exec npx serve -d -p 209 #| npx gnomon; } function main() { - check - buildcss - buildjs - start + check + build + start } if [ "$1" ]; then - $@ - exit 0 + $@ + exit 0 fi main |
