2
2
3
3
## Local run instructions
4
4
5
- Since Tock can be used as a Bot platform or a NLP-only platform,
6
- the _ Bot Admin_ Web frontent extends the _ NLP Admin_ Web frontend.
7
-
8
- To build/run the frontend, one can:
9
-
10
- - merge NLP sources (from NLP assembly) to a temporary folder
11
- (namely ` target/frontend ` ),
12
- - or set symbolic links to NLP sources.
13
-
14
- > For CI/release builds, Maven merges sources to a temporary folder.
15
-
16
- ### Merge sources to target folder
17
-
18
- This is how Maven builds the frontend for deployment.
19
-
20
- Use Maven to merge sources to the ` target/frontend ` temporary folder:
21
-
22
- ```
23
- mvn generate-resources
24
- cd target/frontend
25
- ```
26
-
27
- Then run NPM to setup and launch [ Angular CLI] ( https://cli.angular.io/ ) :
28
-
29
- ```
30
- npm install
31
- npm install -g @angular/cli
32
- ng serve
33
- ```
34
-
35
- > Don't forget to start the
36
- > [ _ Bot Admin_ server] ( https://github.com/theopenconversationkit/tock/blob/master/.idea/runConfigurations/BotAdmin.xml ) .
37
-
38
- ### Symlinks alternative
39
-
40
- One can alternatively add these symbolic links to merge sources in ` src ` folder:
41
-
42
- > For unix users, in the current directory (bot/admin/web):
43
-
44
- ```
45
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/applications" src/app/applications
46
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/archive" src/app/archive
47
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/build" src/app/build
48
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/core-nlp" src/app/core-nlp
49
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/entities" src/app/entities
50
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/inbox" src/app/inbox
51
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/intents" src/app/intents
52
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/logs" src/app/logs
53
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/model" src/app/model
54
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/nlp-tabs" src/app/nlp-tabs
55
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/quality-nlp" src/app/quality-nlp
56
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/scroll" src/app/scroll
57
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/search" src/app/search
58
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/sentence-analysis" src/app/sentence-analysis
59
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/sentences-scroll" src/app/sentences-scroll
60
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/shared-nlp" src/app/shared-nlp
61
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/test-nlp" src/app/test-nlp
62
- ln -s "$(pwd)/../../../nlp/admin/web/src/app/try" src/app/try
63
- ```
64
-
65
- > For Windows users, in the current directory (bot/admin/web):
66
-
67
- Use the CMD and not PowerShell to execute these commands
68
-
69
- ```
70
- mklink /D "src/app/applications" "%cd%/../../../nlp/admin/web/src/app/applications/"
71
- mklink /D "src/app/archive" "%cd%/../../../nlp/admin/web/src/app/archive/"
72
- mklink /D "src/app/build" "%cd%/../../../nlp/admin/web/src/app/build/"
73
- mklink /D "src/app/core-nlp" "%cd%/../../../nlp/admin/web/src/app/core-nlp/"
74
- mklink /D "src/app/entities" "%cd%/../../../nlp/admin/web/src/app/entities/"
75
- mklink /D "src/app/inbox" "%cd%/../../../nlp/admin/web/src/app/inbox/"
76
- mklink /D "src/app/intents" "%cd%/../../../nlp/admin/web/src/app/intents/"
77
- mklink /D "src/app/logs" "%cd%/../../../nlp/admin/web/src/app/logs/"
78
- mklink /D "src/app/model" "%cd%/../../../nlp/admin/web/src/app/model/"
79
- mklink /D "src/app/nlp-tabs" "%cd%/../../../nlp/admin/web/src/app/nlp-tabs/"
80
- mklink /D "src/app/quality-nlp" "%cd%/../../../nlp/admin/web/src/app/quality-nlp/"
81
- mklink /D "src/app/scroll" "%cd%/../../../nlp/admin/web/src/app/scroll/"
82
- mklink /D "src/app/search" "%cd%/../../../nlp/admin/web/src/app/search/"
83
- mklink /D "src/app/sentence-analysis" "%cd%/../../../nlp/admin/web/src/app/sentence-analysis/"
84
- mklink /D "src/app/sentences-scroll" "%cd%/../../../nlp/admin/web/src/app/sentences-scroll/"
85
- mklink /D "src/app/shared-nlp" "%cd%/../../../nlp/admin/web/src/app/shared-nlp/"
86
- mklink /D "src/app/test-nlp" "%cd%/../../../nlp/admin/web/src/app/test-nlp/"
87
- mklink /D "src/app/try" "%cd%/../../../nlp/admin/web/src/app/try/"
88
- ```
89
-
90
- Then run NPM to setup and launch [ Angular CLI] ( https://cli.angular.io/ ) :
91
-
92
5
```
6
+ cd bot/admin/web
93
7
npm install
94
8
npm install -g @angular/cli
95
9
ng serve
@@ -98,17 +12,6 @@ ng serve
98
12
> Don't forget to start the
99
13
> [ _ Bot Admin_ server] ( https://github.com/theopenconversationkit/tock/blob/master/.idea/runConfigurations/BotAdmin.xml ) .
100
14
101
- ## Package instructions
102
-
103
- To build/package the frontend:
104
-
105
- ```
106
- mvn install
107
- ```
108
-
109
- Maven runs NPM / Angular scripts automatically from merged sources folder. They produce the ` web `
110
- assembly, ie. the deployable _ Bot Admin_ frontend application.
111
-
112
15
## Troubleshooting
113
16
114
17
### Windows setup
0 commit comments