@vcmap/plugin-cli 2.0.5 → 2.0.6
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.
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<v-card class="pa-2 ma-2">
|
|
4
4
|
<v-container>
|
|
5
5
|
<v-row class="justify-center mb-4">
|
|
6
|
-
<h1>
|
|
6
|
+
<h1>{{ $t('helloWorld.helloWorld')}}</h1>
|
|
7
7
|
</v-row>
|
|
8
8
|
<v-row class="justify-center">
|
|
9
9
|
<VcsButton
|
|
10
10
|
icon="mdi-times"
|
|
11
11
|
@click="closeSelf"
|
|
12
12
|
>
|
|
13
|
-
|
|
13
|
+
{{ $t('helloWorld.close')}}
|
|
14
14
|
</VcsButton>
|
|
15
15
|
</v-row>
|
|
16
16
|
</v-container>
|
|
@@ -3,19 +3,25 @@ import { version, name } from '../package.json';
|
|
|
3
3
|
import HelloWorld, { windowId } from './helloWorld.vue';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* @param {
|
|
7
|
-
* @
|
|
8
|
-
* @
|
|
6
|
+
* @param {T} config - the configuration of this plugin instance, passed in from the app.
|
|
7
|
+
* @returns {import("@vcmap/ui/src/vcsUiApp").VcsPlugin<T>}
|
|
8
|
+
* @template {Object} T
|
|
9
9
|
*/
|
|
10
|
-
export default function
|
|
10
|
+
export default function(config) {
|
|
11
11
|
return {
|
|
12
12
|
get name() { return name; },
|
|
13
13
|
get version() { return version; },
|
|
14
|
+
/**
|
|
15
|
+
* @param {import("@vcmap/ui").VcsUiApp} vcsUiApp
|
|
16
|
+
* @returns {Promise<void>}
|
|
17
|
+
*/
|
|
14
18
|
initialize: async (vcsUiApp) => {
|
|
15
19
|
console.log('Called before loading the rest of the current context. Passed in the containing Vcs UI App ');
|
|
16
|
-
console.log(app, config);
|
|
17
|
-
console.log(vcsUiApp);
|
|
18
20
|
},
|
|
21
|
+
/**
|
|
22
|
+
* @param {import("@vcmap/ui").VcsUiApp} vcsUiApp
|
|
23
|
+
* @returns {Promise<void>}
|
|
24
|
+
*/
|
|
19
25
|
onVcsAppMounted: async (vcsUiApp) => {
|
|
20
26
|
console.log('Called when the root UI component is mounted and managers are ready to accept components');
|
|
21
27
|
vcsUiApp.windowManager.add({
|
|
@@ -28,8 +34,28 @@ export default function helloWorld(app, config) {
|
|
|
28
34
|
},
|
|
29
35
|
}, name);
|
|
30
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* @returns {Promise<T>}
|
|
39
|
+
*/
|
|
31
40
|
toJSON: async () => {
|
|
32
41
|
console.log('Called when serializing this plugin instance');
|
|
33
42
|
},
|
|
43
|
+
i18n: {
|
|
44
|
+
en: {
|
|
45
|
+
helloWorld: {
|
|
46
|
+
helloWorld: 'Hello World',
|
|
47
|
+
close: 'Close',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
de: {
|
|
51
|
+
helloWorld: {
|
|
52
|
+
helloWorld: 'Hallo Welt',
|
|
53
|
+
close: 'Schließen',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
destroy() {
|
|
58
|
+
console.log('hook to cleanup');
|
|
59
|
+
},
|
|
34
60
|
};
|
|
35
|
-
}
|
|
61
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vcmap/plugin-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "A CLI to help develop and build plugins for the VC Map",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"prompts": "^2.4.1",
|
|
35
35
|
"sass": "1.32.13",
|
|
36
36
|
"semver": "^7.3.5",
|
|
37
|
-
"unplugin-vue-components": "^0.
|
|
37
|
+
"unplugin-vue-components": "^0.19.6",
|
|
38
38
|
"vinyl-fs": "^3.0.3",
|
|
39
|
-
"vite": "^2.9.
|
|
40
|
-
"vite-plugin-vue2": "^
|
|
41
|
-
"vue-template-compiler": "
|
|
39
|
+
"vite": "^2.9.12",
|
|
40
|
+
"vite-plugin-vue2": "^2.0.1",
|
|
41
|
+
"vue-template-compiler": "~2.6.14"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@vcmap/ui": "^5.0.0-rc.9",
|
package/src/build.js
CHANGED
package/src/serve.js
CHANGED
|
@@ -103,6 +103,13 @@ export default async function serve(options) {
|
|
|
103
103
|
https: options.https,
|
|
104
104
|
proxy,
|
|
105
105
|
},
|
|
106
|
+
css: {
|
|
107
|
+
preprocessorOptions: {
|
|
108
|
+
sass: {
|
|
109
|
+
additionalData: "\n@import './node_modules/@vcmap/ui/src/styles/variables.scss'\n",
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
106
113
|
});
|
|
107
114
|
|
|
108
115
|
addMapConfigRoute(app, options.mapConfig, options.auth, options.config);
|