summaryrefslogtreecommitdiff
path: root/launch.sh
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-14 16:20:25 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-14 16:20:25 +0800
commit6dce4e2e8ed35a26af389b7ab388113381350444 (patch)
treefaec54d7858dd7c3d494cfb0e45537bc7ee68832 /launch.sh
parentfee47f6414cc3ae9a88f3ee0ed20f1d6f2d9f556 (diff)
added functions to build, start
Diffstat (limited to 'launch.sh')
-rwxr-xr-xlaunch.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/launch.sh b/launch.sh
index d14f143a..78124fba 100755
--- a/launch.sh
+++ b/launch.sh
@@ -1,4 +1,4 @@
-function selfcheck() {
+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
@@ -7,13 +7,25 @@ function selfcheck() {
# sleep .5
}
+function buildcss() {
+ printf '\033[0;35mCode CSS Build Starts...\033[0m\n'
+ npm run build:css || printf '\033[0;31mCode CSS Build Failed...\033[0m\n'
+}
+
+function buildjs() {
+ printf '\033[0;35mCode JavaScript Compile Starts...\033[0m\n'
+ npm run build:js || printf '\033[0;31mCode JavaScript Compile Failed...\033[0m\n'
+}
+
function start() {
printf '\033[0;32mNpx Server Starting...\033[0m\n'
exec npx serve -d -p 209 #| npx gnomon;
}
function main() {
- selfcheck
+ check
+ buildcss
+ buildjs
start
}