Browse Source

added bash library and specific rebuild script for apps

Skylsmoi 6 years ago
parent
commit
75de072f96

+ 8 - 0
bash_library.sh View File

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
 #!/bin/bash
1
 #!/bin/bash
2
 
2
 
3
+. bash_library.sh # source bash_library.sh
4
+
3
 windoz=""
5
 windoz=""
4
 if  [[ $1 = "-w" ]]; then
6
 if  [[ $1 = "-w" ]]; then
5
     windoz="windoz"
7
     windoz="windoz"
6
 fi
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
 log "cd frontend_lib"
10
 log "cd frontend_lib"
16
 cd frontend_lib
11
 cd frontend_lib
17
 log "npm i"
12
 log "npm i"
18
 npm i
13
 npm i
19
-log "npm link"
20
-npm link
14
+log "sudo npm link"
15
+sudo npm link
21
 log "npm run buildtracimlib$windoz"
16
 log "npm run buildtracimlib$windoz"
22
 npm run buildtracimlib$windoz
17
 npm run buildtracimlib$windoz
23
 cd -
18
 cd -

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

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

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
 #!/bin/bash
1
 #!/bin/bash
2
 
2
 
3
+. bash_library.sh # source bash_library.sh
4
+
3
 windoz=""
5
 windoz=""
4
 if  [[ $1 = "-w" ]]; then
6
 if  [[ $1 = "-w" ]]; then
5
     windoz="windoz"
7
     windoz="windoz"
6
 fi
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
 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"
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
 log "cd frontend_lib"
12
 log "cd frontend_lib"