jmapcloud-ng 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +269 -0
- package/.prettierrc +10 -0
- package/package.json +132 -0
- package/public/index.html +46 -0
- package/readme.md +37 -0
- package/syncAndBuild.sh +27 -0
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true
|
|
4
|
+
},
|
|
5
|
+
extends: [
|
|
6
|
+
"plugin:@typescript-eslint/recommended",
|
|
7
|
+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
8
|
+
"prettier"
|
|
9
|
+
],
|
|
10
|
+
parser: "@typescript-eslint/parser",
|
|
11
|
+
parserOptions: {
|
|
12
|
+
project: "tsconfig.json",
|
|
13
|
+
sourceType: "module"
|
|
14
|
+
},
|
|
15
|
+
plugins: [
|
|
16
|
+
"eslint-plugin-import",
|
|
17
|
+
"eslint-plugin-jsdoc",
|
|
18
|
+
"eslint-plugin-prefer-arrow",
|
|
19
|
+
"@typescript-eslint",
|
|
20
|
+
"@typescript-eslint/tslint"
|
|
21
|
+
],
|
|
22
|
+
root: true,
|
|
23
|
+
rules: {
|
|
24
|
+
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
25
|
+
"@typescript-eslint/array-type": [
|
|
26
|
+
"error",
|
|
27
|
+
{
|
|
28
|
+
default: "array-simple"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"@typescript-eslint/ban-types": [
|
|
32
|
+
"error",
|
|
33
|
+
{
|
|
34
|
+
types: {
|
|
35
|
+
"Object": {
|
|
36
|
+
message: "Avoid using the `Object` type. Did you mean `object`?"
|
|
37
|
+
},
|
|
38
|
+
"Function": {
|
|
39
|
+
message: "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."
|
|
40
|
+
},
|
|
41
|
+
"Boolean": {
|
|
42
|
+
message: "Avoid using the `Boolean` type. Did you mean `boolean`?"
|
|
43
|
+
},
|
|
44
|
+
"Number": {
|
|
45
|
+
message: "Avoid using the `Number` type. Did you mean `number`?"
|
|
46
|
+
},
|
|
47
|
+
"String": {
|
|
48
|
+
message: "Avoid using the `String` type. Did you mean `string`?"
|
|
49
|
+
},
|
|
50
|
+
"Symbol": {
|
|
51
|
+
message: "Avoid using the `Symbol` type. Did you mean `symbol`?"
|
|
52
|
+
},
|
|
53
|
+
"{}": false
|
|
54
|
+
},
|
|
55
|
+
extendDefaults: true
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"@typescript-eslint/consistent-type-assertions": "error",
|
|
59
|
+
"@typescript-eslint/consistent-type-definitions": "error",
|
|
60
|
+
"@typescript-eslint/dot-notation": "error",
|
|
61
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
62
|
+
"@typescript-eslint/explicit-member-accessibility": [
|
|
63
|
+
"error",
|
|
64
|
+
{
|
|
65
|
+
accessibility: "explicit"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
69
|
+
"@typescript-eslint/member-delimiter-style": [
|
|
70
|
+
"error",
|
|
71
|
+
{
|
|
72
|
+
multiline: {
|
|
73
|
+
delimiter: "none",
|
|
74
|
+
requireLast: true
|
|
75
|
+
},
|
|
76
|
+
singleline: {
|
|
77
|
+
delimiter: "semi",
|
|
78
|
+
requireLast: false
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"@typescript-eslint/member-ordering": "error",
|
|
83
|
+
"@typescript-eslint/naming-convention": "off",
|
|
84
|
+
"@typescript-eslint/no-empty-function": "error",
|
|
85
|
+
"@typescript-eslint/no-empty-interface": "error",
|
|
86
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
87
|
+
"@typescript-eslint/no-misused-new": "error",
|
|
88
|
+
"@typescript-eslint/no-namespace": "error",
|
|
89
|
+
"@typescript-eslint/no-parameter-properties": "off",
|
|
90
|
+
"no-shadow": "off",
|
|
91
|
+
"@typescript-eslint/no-shadow": [
|
|
92
|
+
"error",
|
|
93
|
+
{
|
|
94
|
+
hoist: "never"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
98
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
99
|
+
"@typescript-eslint/no-var-requires": "error",
|
|
100
|
+
"@typescript-eslint/prefer-for-of": "error",
|
|
101
|
+
"@typescript-eslint/prefer-function-type": "error",
|
|
102
|
+
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
103
|
+
"@typescript-eslint/quotes": [
|
|
104
|
+
"error",
|
|
105
|
+
"double",
|
|
106
|
+
{
|
|
107
|
+
avoidEscape: true
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"@typescript-eslint/semi": ["error", "never"],
|
|
111
|
+
"@typescript-eslint/triple-slash-reference": [
|
|
112
|
+
"error",
|
|
113
|
+
{
|
|
114
|
+
path: "always",
|
|
115
|
+
types: "prefer-import",
|
|
116
|
+
lib: "always"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"@typescript-eslint/type-annotation-spacing": "error",
|
|
120
|
+
"@typescript-eslint/typedef": "off",
|
|
121
|
+
"@typescript-eslint/unified-signatures": "error",
|
|
122
|
+
"arrow-body-style": "error",
|
|
123
|
+
"arrow-parens": ["error", "as-needed"],
|
|
124
|
+
"brace-style": ["error", "1tbs"],
|
|
125
|
+
"comma-dangle": "error",
|
|
126
|
+
"complexity": "off",
|
|
127
|
+
"constructor-super": "error",
|
|
128
|
+
"curly": "error",
|
|
129
|
+
"dot-notation": "error",
|
|
130
|
+
"eol-last": "error",
|
|
131
|
+
"eqeqeq": ["error", "smart"],
|
|
132
|
+
"guard-for-in": "error",
|
|
133
|
+
"id-denylist": [
|
|
134
|
+
"off",
|
|
135
|
+
"any",
|
|
136
|
+
"Number",
|
|
137
|
+
"number",
|
|
138
|
+
"String",
|
|
139
|
+
"string",
|
|
140
|
+
"Boolean",
|
|
141
|
+
"boolean",
|
|
142
|
+
"Undefined",
|
|
143
|
+
"undefined"
|
|
144
|
+
],
|
|
145
|
+
"id-match": "off",
|
|
146
|
+
"import/order": "off",
|
|
147
|
+
"jsdoc/check-alignment": "error",
|
|
148
|
+
"jsdoc/check-indentation": "error",
|
|
149
|
+
"jsdoc/newline-after-description": "error",
|
|
150
|
+
"max-classes-per-file": ["error", 10],
|
|
151
|
+
"max-len": [
|
|
152
|
+
"error",
|
|
153
|
+
{
|
|
154
|
+
code: 130
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"new-parens": "error",
|
|
158
|
+
"no-bitwise": "error",
|
|
159
|
+
"no-caller": "error",
|
|
160
|
+
"no-cond-assign": "error",
|
|
161
|
+
"no-console": [
|
|
162
|
+
"error",
|
|
163
|
+
{
|
|
164
|
+
allow: [
|
|
165
|
+
"warn",
|
|
166
|
+
"dir",
|
|
167
|
+
"time",
|
|
168
|
+
"timeEnd",
|
|
169
|
+
"timeLog",
|
|
170
|
+
"trace",
|
|
171
|
+
"assert",
|
|
172
|
+
"clear",
|
|
173
|
+
"count",
|
|
174
|
+
"countReset",
|
|
175
|
+
"group",
|
|
176
|
+
"groupEnd",
|
|
177
|
+
"table",
|
|
178
|
+
"debug",
|
|
179
|
+
"info",
|
|
180
|
+
"dirxml",
|
|
181
|
+
"error",
|
|
182
|
+
"groupCollapsed",
|
|
183
|
+
"Console",
|
|
184
|
+
"profile",
|
|
185
|
+
"profileEnd",
|
|
186
|
+
"timeStamp",
|
|
187
|
+
"context"
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"no-debugger": "error",
|
|
192
|
+
"no-empty": "error",
|
|
193
|
+
"no-empty-function": "error",
|
|
194
|
+
"no-eval": "off",
|
|
195
|
+
"no-fallthrough": "off",
|
|
196
|
+
"no-invalid-this": "off",
|
|
197
|
+
"no-multiple-empty-lines": "error",
|
|
198
|
+
"no-new-wrappers": "error",
|
|
199
|
+
"no-throw-literal": "error",
|
|
200
|
+
"no-trailing-spaces": [
|
|
201
|
+
"error",
|
|
202
|
+
{
|
|
203
|
+
ignoreComments: true
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"no-undef-init": "error",
|
|
207
|
+
"no-underscore-dangle": "off",
|
|
208
|
+
"no-unreachable": "error",
|
|
209
|
+
"no-unsafe-finally": "error",
|
|
210
|
+
"no-unused-expressions": "error",
|
|
211
|
+
"no-unused-labels": "error",
|
|
212
|
+
"no-use-before-define": "off",
|
|
213
|
+
"no-var": "error",
|
|
214
|
+
"object-shorthand": "error",
|
|
215
|
+
"one-var": ["error", "never"],
|
|
216
|
+
"prefer-const": "error",
|
|
217
|
+
"quote-props": ["error", "consistent-as-needed"],
|
|
218
|
+
"quotes": ["error", "double", "avoid-escape"],
|
|
219
|
+
"radix": "error",
|
|
220
|
+
"semi": ["error", "never"],
|
|
221
|
+
"space-before-function-paren": [
|
|
222
|
+
"error",
|
|
223
|
+
{
|
|
224
|
+
anonymous: "never",
|
|
225
|
+
asyncArrow: "always",
|
|
226
|
+
named: "never"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"spaced-comment": [
|
|
230
|
+
"error",
|
|
231
|
+
"always",
|
|
232
|
+
{
|
|
233
|
+
markers: ["/"]
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"use-isnan": "error",
|
|
237
|
+
"valid-typeof": "off",
|
|
238
|
+
"no-unused-vars": "off",
|
|
239
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
240
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
241
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
242
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
243
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
244
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
245
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
246
|
+
"@typescript-eslint/no-misused-promises": "off",
|
|
247
|
+
"@typescript-eslint/no-floating-promises": "off",
|
|
248
|
+
"@typescript-eslint/unbound-method": "off",
|
|
249
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
250
|
+
"@typescript-eslint/require-await": "off",
|
|
251
|
+
"@typescript-eslint/tslint/config": [
|
|
252
|
+
"error",
|
|
253
|
+
{
|
|
254
|
+
rules: {
|
|
255
|
+
"import-spacing": true,
|
|
256
|
+
"whitespace": [
|
|
257
|
+
true,
|
|
258
|
+
"check-branch",
|
|
259
|
+
"check-decl",
|
|
260
|
+
"check-operator",
|
|
261
|
+
"check-separator",
|
|
262
|
+
"check-type",
|
|
263
|
+
"check-typecast"
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
}
|
package/.prettierrc
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jmapcloud-ng",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "K2 Geospatial Web Client",
|
|
5
|
+
"private": false,
|
|
6
|
+
"main": "public/index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"lint": "export NODE_ENV='production'; gulp lint --gulpfile build/gulpfile.js;",
|
|
10
|
+
"build": "export NODE_ENV='production'; gulp --gulpfile build/gulpfile.js;",
|
|
11
|
+
"build-vps": "export NODE_ENV='production' SERVER_JS_PATH='/var/www/html/ng/ng' WEBPACK_PUBLIC_PATH='./ng/' CORE_INDEX_FILE_URL='./ng-core/index.js'; gulp build-vps --gulpfile build/gulpfile.js;",
|
|
12
|
+
"build-dev": "export NODE_ENV='development'; gulp --gulpfile build/gulpfile.js;",
|
|
13
|
+
"build-win": "gulp --gulpfile build/gulpfile.js",
|
|
14
|
+
"copy": "export NODE_ENV='development'; gulp copy-html --gulpfile build/gulpfile.js;",
|
|
15
|
+
"count-all": "find ./src -name '*.ts*' | xargs wc -l",
|
|
16
|
+
"count-test": "find ./src -name '*.spec.ts' | xargs wc -l",
|
|
17
|
+
"start": "gulp --gulpfile build/gulpfile.js start",
|
|
18
|
+
"start-tunnel": "lt --local-https true --allow-invalid-cert --port 8082 -s "
|
|
19
|
+
},
|
|
20
|
+
"author": "K2 Geospatial",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"ignore": [
|
|
23
|
+
"**/.*",
|
|
24
|
+
"node_modules"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@date-io/date-fns": "^1.3.13",
|
|
28
|
+
"@fortawesome/fontawesome-pro": "^5.15.0",
|
|
29
|
+
"@fortawesome/fontawesome-svg-core": "^1.2.31",
|
|
30
|
+
"@fortawesome/pro-duotone-svg-icons": "^5.15.0",
|
|
31
|
+
"@fortawesome/pro-light-svg-icons": "^5.15.0",
|
|
32
|
+
"@fortawesome/pro-regular-svg-icons": "^5.15.0",
|
|
33
|
+
"@fortawesome/pro-solid-svg-icons": "^5.15.0",
|
|
34
|
+
"@fortawesome/react-fontawesome": "^0.1.11",
|
|
35
|
+
"@mapbox/mapbox-gl-draw": "1.3.0",
|
|
36
|
+
"@material-ui/core": "^4.12.3",
|
|
37
|
+
"@material-ui/icons": "^4.11.2",
|
|
38
|
+
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
39
|
+
"@material-ui/pickers": "^3.3.10",
|
|
40
|
+
"@turf/circle": "^6.5.0",
|
|
41
|
+
"@turf/helpers": "6.5.0",
|
|
42
|
+
"axios": "^0.21.4",
|
|
43
|
+
"babel-polyfill": "^6.26.0",
|
|
44
|
+
"color": "^3.1.3",
|
|
45
|
+
"core-js": "^3.10.0",
|
|
46
|
+
"date-fns": "^2.23.0",
|
|
47
|
+
"formik": "^2.2.9",
|
|
48
|
+
"geometric": "^2.5.0",
|
|
49
|
+
"hast-util-to-html": "^8.0.3",
|
|
50
|
+
"jmapcloud-ng-core": "0.0.1",
|
|
51
|
+
"json-pointer": "^0.6.1",
|
|
52
|
+
"jspdf": "^2.3.1",
|
|
53
|
+
"mapbox-gl": "^1.13.1",
|
|
54
|
+
"material-design-icons": "^3.0.1",
|
|
55
|
+
"normalize-diacritics": "^3.0.0",
|
|
56
|
+
"react": "^17.0.2",
|
|
57
|
+
"react-color": "^2.19.3",
|
|
58
|
+
"react-dom": "^17.0.2",
|
|
59
|
+
"react-redux": "^7.2.5",
|
|
60
|
+
"react-select": "^4.3.1",
|
|
61
|
+
"react-swipeable-views": "^0.14.0",
|
|
62
|
+
"react-window": "^1.8.6",
|
|
63
|
+
"redux": "^4.1.1",
|
|
64
|
+
"regenerator-runtime": "^0.13.9",
|
|
65
|
+
"svg-parser": "^2.0.4",
|
|
66
|
+
"uuid": "^8.3.2",
|
|
67
|
+
"xlsx": "^0.17.1"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@babel/core": "^7.15.5",
|
|
71
|
+
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
|
72
|
+
"@babel/plugin-proposal-decorators": "^7.15.4",
|
|
73
|
+
"@babel/plugin-transform-arrow-functions": "^7.14.5",
|
|
74
|
+
"@babel/plugin-transform-object-assign": "^7.14.5",
|
|
75
|
+
"@babel/plugin-transform-react-jsx": "7.14.9",
|
|
76
|
+
"@babel/plugin-transform-runtime": "^7.15.0",
|
|
77
|
+
"@babel/preset-env": "^7.15.4",
|
|
78
|
+
"@babel/preset-react": "7.14.5",
|
|
79
|
+
"@babel/preset-typescript": "^7.15.0",
|
|
80
|
+
"@babel/runtime": "^7.15.4",
|
|
81
|
+
"@types/chai": "^4.2.21",
|
|
82
|
+
"@types/color": "^3.0.2",
|
|
83
|
+
"@types/geometric": "^2.2.0",
|
|
84
|
+
"@types/json-pointer": "^1.0.31",
|
|
85
|
+
"@types/mapbox-gl": "^1.13.1",
|
|
86
|
+
"@types/mocha": "^9.0.0",
|
|
87
|
+
"@types/react": "^17.0.20",
|
|
88
|
+
"@types/react-color": "^3.0.5",
|
|
89
|
+
"@types/react-dom": "^17.0.9",
|
|
90
|
+
"@types/react-redux": "^7.1.18",
|
|
91
|
+
"@types/react-swipeable-views": "^0.13.1",
|
|
92
|
+
"@types/react-window": "^1.8.5",
|
|
93
|
+
"@types/svg-parser": "^2.0.3",
|
|
94
|
+
"@types/uuid": "^8.3.1",
|
|
95
|
+
"@types/webpack-env": "^1.16.2",
|
|
96
|
+
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
|
97
|
+
"@typescript-eslint/eslint-plugin-tslint": "^5.29.0",
|
|
98
|
+
"@typescript-eslint/parser": "^5.29.0",
|
|
99
|
+
"babel-engine-plugin": "^0.3.0",
|
|
100
|
+
"babel-loader": "^8.2.2",
|
|
101
|
+
"babel-preset-env": "^1.7.0",
|
|
102
|
+
"babel-preset-es2015": "^6.24.1",
|
|
103
|
+
"chai": "^4.2.4",
|
|
104
|
+
"chai-http": "^4.3.0",
|
|
105
|
+
"css-loader": "^6.2.0",
|
|
106
|
+
"del": "^6.0.0",
|
|
107
|
+
"eslint": "^8.18.0",
|
|
108
|
+
"eslint-config-prettier": "^8.5.0",
|
|
109
|
+
"eslint-plugin-import": "^2.26.0",
|
|
110
|
+
"eslint-plugin-jsdoc": "^39.3.3",
|
|
111
|
+
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
112
|
+
"file-loader": "^6.2.0",
|
|
113
|
+
"gulp": "^4.0.2",
|
|
114
|
+
"gulp-eslint": "^6.0.0",
|
|
115
|
+
"gulp-plumber": "^1.2.1",
|
|
116
|
+
"gulp-rewrite-css": "^1.1.2",
|
|
117
|
+
"jmapcloud-ng-types": "0.0.1",
|
|
118
|
+
"jmapcloud-ng-core-types": "0.0.4",
|
|
119
|
+
"postcss-loader": "^6.1.1",
|
|
120
|
+
"postcss-parent-selector": "^1.0.0",
|
|
121
|
+
"source-map-loader": "^3.0.0",
|
|
122
|
+
"style-loader": "^3.2.1",
|
|
123
|
+
"terser-webpack-plugin": "^5.2.4",
|
|
124
|
+
"ts-loader": "^9.2.5",
|
|
125
|
+
"typescript": "^4.4.2",
|
|
126
|
+
"vinyl-paths": "^4.0.0",
|
|
127
|
+
"webpack": "^5.52.0",
|
|
128
|
+
"webpack-bundle-analyzer": "^4.4.2",
|
|
129
|
+
"webpack-dev-server": "^3.11.2",
|
|
130
|
+
"webpack-stream": "^7.0.0"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>JMap Cloud NG</title>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
|
6
|
+
<meta charset="UTF-8" />
|
|
7
|
+
<style>
|
|
8
|
+
html,
|
|
9
|
+
body {
|
|
10
|
+
padding: 0px;
|
|
11
|
+
margin: 0px;
|
|
12
|
+
height: 100%;
|
|
13
|
+
width: 100%;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
#my-custom-appz {
|
|
17
|
+
position: relative;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
margin-left: 50px;
|
|
20
|
+
margin-top: 50px;
|
|
21
|
+
width: 1100px;
|
|
22
|
+
height: 850px;
|
|
23
|
+
border: 0.0625rem solid grey;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
26
|
+
</head>
|
|
27
|
+
|
|
28
|
+
<body>
|
|
29
|
+
<script type="text/javascript">
|
|
30
|
+
window.JMAP_OPTIONS = {
|
|
31
|
+
// restBaseUrl: "http://localhost:8080/services/rest/v2.0",
|
|
32
|
+
// restBaseUrl: "https://api.dev-<dev-username>.jmapcloud.io", // reversed-proxied https cloud dev instance; use a port forwarder to configure the service to be available on 8765 inside your instance
|
|
33
|
+
// restBaseUrl: "http://localhost:8765", // local JMap Cloud instance; use a port forwarder to configure the service to be available on 8765
|
|
34
|
+
// restBaseUrl: "https://jmap7test1.jmaponline.net/services/rest/v2.0",
|
|
35
|
+
// restBaseUrl: "https://jmap7dev-jakarta.jmaponline.net/services/rest/v2.0",
|
|
36
|
+
restBaseUrl: "https://jmap7dev-kathmandu.jmaponline.net/services/rest/v2.0",
|
|
37
|
+
map: {},
|
|
38
|
+
application: {
|
|
39
|
+
containerId: "my-custom-app"
|
|
40
|
+
},
|
|
41
|
+
hideMainLayout: true
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
<script defer type="text/javascript" src="/build/index.js"></script>
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|
package/readme.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#### The first time, install dependencies :
|
|
2
|
+
|
|
3
|
+
npm i
|
|
4
|
+
|
|
5
|
+
#### To start the application :
|
|
6
|
+
|
|
7
|
+
npm start
|
|
8
|
+
|
|
9
|
+
The application is accessible at this location : http://localhost:8082
|
|
10
|
+
|
|
11
|
+
When code is changed, it's automatically built and the web page refresh by its own (thanks webpack dev server).
|
|
12
|
+
|
|
13
|
+
#### Install the following vs-code extensions :
|
|
14
|
+
|
|
15
|
+
- https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
|
|
16
|
+
- "Prettier - Code formatter" extention (Author : Esben Petersen)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
#### VPS publishing
|
|
20
|
+
|
|
21
|
+
When working in a VPS environment, your personal VPS expect to find the Portal compiled sources in a local diretory inside the web hosting VPS infrascructure.
|
|
22
|
+
|
|
23
|
+
IMPORTANT: To be able to serve NG onn your VPS you need to "syncAndBuild" both jmapcloud-ng and jmapcloud-ng-core
|
|
24
|
+
|
|
25
|
+
To achieve this you must run this command inside the root of your local checkout of jmapcloud-ng, and jmapcloud-ng-core, in turn (build order is not important):
|
|
26
|
+
|
|
27
|
+
// inside jmapcloud-ng:
|
|
28
|
+
./syncAndBuild.sh <vps-prefix>
|
|
29
|
+
|
|
30
|
+
// and then inside jmapcloud-ng-core:
|
|
31
|
+
./syncAndBuild.sh <vps-prefix>
|
|
32
|
+
|
|
33
|
+
If your vps is "dev-jdoe.jmapcloud.io" then you should run:
|
|
34
|
+
|
|
35
|
+
./syncAndBuild.sh dev-jdoe
|
|
36
|
+
|
|
37
|
+
after build, your compiled portal would be accessible at https://ng.dev-jdoe.jmapcloud.io/
|
package/syncAndBuild.sh
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
if [[ $# -eq 0 ]] ; then
|
|
4
|
+
echo 'Usage: syncAndBuild.sh <hostname>|build'
|
|
5
|
+
exit 1
|
|
6
|
+
fi
|
|
7
|
+
|
|
8
|
+
SERVICE_NAME="jmapcloud-ng"
|
|
9
|
+
|
|
10
|
+
if [[ $1 == build ]]; then
|
|
11
|
+
# This part is meant to run on the VPS
|
|
12
|
+
source ~/.nvm/nvm.sh
|
|
13
|
+
nvm install 16
|
|
14
|
+
nvm use 16
|
|
15
|
+
npm install
|
|
16
|
+
npm run build-vps
|
|
17
|
+
|
|
18
|
+
else
|
|
19
|
+
# This part is meant to run on your local dev machine
|
|
20
|
+
SSH_HOST="k2geo@${1}.jmapcloud.io"
|
|
21
|
+
|
|
22
|
+
RSYNC_OPTIONS=(-a -v --delete --exclude="node_modules" --exclude="public" --exclude=".git" --exclude="build/env-config.js")
|
|
23
|
+
RSYNC_SOURCE="."
|
|
24
|
+
RSYNC_DESTINATION="${SSH_HOST}:${SERVICE_NAME}"
|
|
25
|
+
|
|
26
|
+
rsync "${RSYNC_OPTIONS[@]}" "$RSYNC_SOURCE" "$RSYNC_DESTINATION" && ssh "$SSH_HOST" "cd $SERVICE_NAME && ./syncAndBuild.sh build"
|
|
27
|
+
fi
|