Browse Source

added bash library and specific rebuild script for apps

Skylsmoi 5 years ago
parent
commit
75de072f96

+ 8 - 0
bash_library.sh View File

@@ -0,0 +1,8 @@
1
+#!/bin/bash
2
+
3
+BROWN='\033[0;33m'
4
+NC='\033[0m' # No Color
5
+
6
+function log {
7
+    echo -e "\n${BROWN}>> $ $1${NC}\n"
8
+}

+ 4 - 9
first_install_frontend.sh View File

@@ -1,23 +1,18 @@
1 1
 #!/bin/bash
2 2
 
3
+. bash_library.sh # source bash_library.sh
4
+
3 5
 windoz=""
4 6
 if  [[ $1 = "-w" ]]; then
5 7
     windoz="windoz"
6 8
 fi
7 9
 
8
-BROWN='\033[0;33m'
9
-NC='\033[0m' # No Color
10
-
11
-function log {
12
-    echo -e "\n${BROWN}>> $ $1${NC}\n"
13
-}
14
-
15 10
 log "cd frontend_lib"
16 11
 cd frontend_lib
17 12
 log "npm i"
18 13
 npm i
19
-log "npm link"
20
-npm link
14
+log "sudo npm link"
15
+sudo npm link
21 16
 log "npm run buildtracimlib$windoz"
22 17
 npm run buildtracimlib$windoz
23 18
 cd -

+ 13 - 0
frontend_app_html-document/rebuild_html-document.sh View File

@@ -0,0 +1,13 @@
1
+#!/bin/bash
2
+
3
+. ../bash_library.sh # source bash_library.sh
4
+
5
+windoz=""
6
+if  [[ $1 = "-w" ]]; then
7
+    windoz="windoz"
8
+fi
9
+
10
+log "npm run build$windoz"
11
+npm run build$windoz
12
+log "cp dist/html-document.app.js ../frontend/dist/app"
13
+cp dist/html-document.app.js ../frontend/dist/app

+ 13 - 0
frontend_app_thread/rebuild_thread.sh View File

@@ -0,0 +1,13 @@
1
+#!/bin/bash
2
+
3
+. ../bash_library.sh # source bash_library.sh
4
+
5
+windoz=""
6
+if  [[ $1 = "-w" ]]; then
7
+    windoz="windoz"
8
+fi
9
+
10
+log "npm run build$windoz"
11
+npm run build$windoz
12
+log "cp dist/thread.app.js ../frontend/dist/app"
13
+cp dist/thread.app.js ../frontend/dist/app

+ 2 - 7
rebuild_full_frontend.sh View File

@@ -1,17 +1,12 @@
1 1
 #!/bin/bash
2 2
 
3
+. bash_library.sh # source bash_library.sh
4
+
3 5
 windoz=""
4 6
 if  [[ $1 = "-w" ]]; then
5 7
     windoz="windoz"
6 8
 fi
7 9
 
8
-BROWN='\033[0;33m'
9
-NC='\033[0m' # No Color
10
-
11
-function log {
12
-    echo -e "\n${BROWN}>> $ $1${NC}\n"
13
-}
14
-
15 10
 echo -e "\n${BROWN}/!\ ${NC}this script does not run 'npm install'\n${BROWN}/!\ ${NC}it also assumes your webpack dev server of frontend is running"
16 11
 
17 12
 log "cd frontend_lib"