|
@@ -1,5 +1,6 @@
|
1
|
1
|
#!/bin/bash
|
2
|
2
|
|
|
3
|
+# shellcheck disable=SC1091
|
3
|
4
|
. bash_library.sh # source bash_library.sh
|
4
|
5
|
|
5
|
6
|
windoz=""
|
|
@@ -10,81 +11,77 @@ fi
|
10
|
11
|
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"
|
11
|
12
|
|
12
|
13
|
# Tracim Lib
|
|
14
|
+log "build frontend_lib"
|
|
15
|
+(
|
|
16
|
+ cd frontend_lib || exit
|
|
17
|
+ npm run buildtracimlib$windoz
|
|
18
|
+)
|
13
|
19
|
|
14
|
|
-log "cd frontend_lib"
|
15
|
|
-cd frontend_lib
|
16
|
|
-log "npm run buildtracimlib$windoz"
|
17
|
|
-npm run buildtracimlib$windoz
|
18
|
|
-cd -
|
19
|
20
|
|
20
|
21
|
# app Html Document
|
|
22
|
+log "build frontend_app_html-document"
|
|
23
|
+(
|
|
24
|
+ cd frontend_app_html-document || exit
|
|
25
|
+ npm run build$windoz
|
|
26
|
+)
|
21
|
27
|
|
22
|
|
-log "cd frontend_app_html-document"
|
23
|
|
-cd frontend_app_html-document
|
|
28
|
+log "copying built file to frontend/"
|
|
29
|
+cp frontend_app_html-document/dist/html-document.app.js frontend/dist/app/
|
24
|
30
|
|
25
|
|
-log "npm run build$windoz # for frontend_app_html-document"
|
26
|
|
-npm run build$windoz
|
|
31
|
+log "copying en translation.json"
|
|
32
|
+cp frontend_app_html-document/i18next.scanner/en/translation.json frontend/dist/app/html-document_en_translation.json
|
27
|
33
|
|
28
|
|
-log "cp dist/html-document.app.js"
|
29
|
|
-cp dist/html-document.app.js ../frontend/dist/app
|
|
34
|
+log "copying fr translation.json"
|
|
35
|
+cp frontend_app_html-document/i18next.scanner/fr/translation.json frontend/dist/app/html-document_fr_translation.json
|
30
|
36
|
|
31
|
|
-log "cp i18next.scanner/en/translation.json ../frontend/dist/app/tml-document_en_translation.json"
|
32
|
|
-cp i18next.scanner/en/translation.json ../frontend/dist/app/html-document_en_translation.json
|
33
|
|
-
|
34
|
|
-log "cp i18next.scanner/fr/translation.json ../frontend/dist/app/html-document_fr_translation.json"
|
35
|
|
-cp i18next.scanner/fr/translation.json ../frontend/dist/app/html-document_fr_translation.json
|
36
|
|
-cd -
|
37
|
37
|
|
38
|
38
|
# app Thread
|
|
39
|
+log "build frontend_app_thread"
|
|
40
|
+(
|
|
41
|
+ cd frontend_app_thread || exit
|
|
42
|
+ npm run build$windoz
|
|
43
|
+)
|
39
|
44
|
|
40
|
|
-log "cd frontend_app_thread"
|
41
|
|
-cd frontend_app_thread
|
42
|
|
-
|
43
|
|
-log "npm run build$windoz # for frontend_app_thread"
|
44
|
|
-npm run build$windoz
|
|
45
|
+log "copying built file to frontend/"
|
|
46
|
+cp frontend_app_thread/dist/thread.app.js frontend/dist/app/
|
45
|
47
|
|
46
|
|
-log "cp dist/thread.app.js"
|
47
|
|
-cp dist/thread.app.js ../frontend/dist/app
|
|
48
|
+log "copying Thread en translation.json"
|
|
49
|
+cp frontend_app_thread/i18next.scanner/en/translation.json frontend/dist/app/thread_en_translation.json
|
48
|
50
|
|
49
|
|
-log "cp i18next.scanner/en/translation.json ../frontend/dist/app/thread_en_translation.json"
|
50
|
|
-cp i18next.scanner/en/translation.json ../frontend/dist/app/thread_en_translation.json
|
|
51
|
+log "copying Thread fr translation.json"
|
|
52
|
+cp frontend_app_thread/i18next.scanner/fr/translation.json frontend/dist/app/thread_fr_translation.json
|
51
|
53
|
|
52
|
|
-log "cp i18next.scanner/fr/translation.json ../frontend/dist/app/thread_fr_translation.json"
|
53
|
|
-cp i18next.scanner/fr/translation.json ../frontend/dist/app/thread_fr_translation.json
|
54
|
|
-cd -
|
55
|
54
|
|
56
|
55
|
# app Workspace
|
|
56
|
+log "build frontend_app_workspace"
|
|
57
|
+(
|
|
58
|
+ cd frontend_app_workspace || exit
|
|
59
|
+ npm run build$windoz
|
|
60
|
+)
|
57
|
61
|
|
58
|
|
-log "cd frontend_app_workspace"
|
59
|
|
-cd frontend_app_workspace
|
60
|
|
-
|
61
|
|
-log "npm run build$windoz # for frontend_app_workspace"
|
62
|
|
-npm run build$windoz
|
|
62
|
+log "copying built file to frontend/"
|
|
63
|
+cp frontend_app_workspace/dist/workspace.app.js frontend/dist/app/
|
63
|
64
|
|
64
|
|
-log "cp dist/workspace.app.js"
|
65
|
|
-cp dist/workspace.app.js ../frontend/dist/app
|
|
65
|
+log "copying Thread en translation.json"
|
|
66
|
+cp frontend_app_workspace/i18next.scanner/en/translation.json frontend/dist/app/workspace_en_translation.json
|
66
|
67
|
|
67
|
|
-log "cp i18next.scanner/en/translation.json ../frontend/dist/app/workspace_en_translation.json"
|
68
|
|
-cp i18next.scanner/en/translation.json ../frontend/dist/app/workspace_en_translation.json
|
69
|
|
-
|
70
|
|
-log "cp i18next.scanner/fr/translation.json ../frontend/dist/app/workspace_fr_translation.json"
|
71
|
|
-cp i18next.scanner/fr/translation.json ../frontend/dist/app/workspace_fr_translation.json
|
72
|
|
-cd -
|
|
68
|
+log "copying Thread fr translation.json"
|
|
69
|
+cp frontend_app_workspace/i18next.scanner/fr/translation.json frontend/dist/app/workspace_fr_translation.json
|
73
|
70
|
|
74
|
71
|
# app Admin Workspace User
|
|
72
|
+log "build frontend_app_admin_workspace_user"
|
|
73
|
+(
|
|
74
|
+ cd frontend_app_admin_workspace_user || exit
|
|
75
|
+ npm run build$windoz
|
|
76
|
+)
|
75
|
77
|
|
76
|
|
-log "cd frontend_app_admin_workspace_user"
|
77
|
|
-cd frontend_app_admin_workspace_user
|
78
|
|
-
|
79
|
|
-log "npm run build$windoz # for frontend_app_thread"
|
80
|
|
-npm run build$windoz
|
|
78
|
+log "copying built file to frontend/"
|
|
79
|
+cp frontend_app_admin_workspace_user/dist/admin_workspace_user.app.js frontend/dist/app/
|
81
|
80
|
|
82
|
|
-log "cp dist/admin_workspace_user.app.js"
|
83
|
|
-cp dist/admin_workspace_user.app.js ../frontend/dist/app
|
|
81
|
+log "copying Thread en translation.json"
|
|
82
|
+cp frontend_app_admin_workspace_user/i18next.scanner/en/translation.json frontend/dist/app/admin_workspace_user_en_translation.json
|
84
|
83
|
|
85
|
|
-log "cp i18next.scanner/en/translation.json ../frontend/dist/app/admin_workspace_user_en_translation.json"
|
86
|
|
-cp i18next.scanner/en/translation.json ../frontend/dist/app/admin_workspace_user_en_translation.json
|
|
84
|
+log "copying Thread fr translation.json"
|
|
85
|
+cp frontend_app_admin_workspace_user/i18next.scanner/fr/translation.json frontend/dist/app/admin_workspace_user_fr_translation.json
|
87
|
86
|
|
88
|
|
-log "cp i18next.scanner/fr/translation.json ../frontend/dist/app/admin_workspace_user_fr_translation.json"
|
89
|
|
-cp i18next.scanner/fr/translation.json ../frontend/dist/app/admin_workspace_user_fr_translation.json
|
90
|
|
-cd -
|
|
87
|
+log "frontend fully built"
|