@vcmap/plugin-cli 2.0.3 → 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.
- package/README.md +0 -4
- package/assets/helloWorld/src/helloWorld.vue +3 -3
- package/assets/helloWorld/src/index.js +33 -7
- package/package.json +6 -6
- package/src/build.js +3 -0
- package/src/create.js +0 -1
- package/src/serve.js +7 -1
package/README.md
CHANGED
|
@@ -7,9 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
The `vcmplugin` cli helps develop and build plugins for the **VC Map**.
|
|
9
9
|
|
|
10
|
-
For more information on plugin development refer to [map plugin examples](https://github.com/virtualcitySYSTEMS/map-plugin-examples),
|
|
11
|
-
which provides documentations and a tutorial on plugin development.
|
|
12
|
-
|
|
13
10
|
## Features
|
|
14
11
|
|
|
15
12
|
- Creating basic plugin structure
|
|
@@ -116,7 +113,6 @@ as peer dependencies if you use them in your plugin:
|
|
|
116
113
|
- @vcmap/core
|
|
117
114
|
- @vcmap/cesium
|
|
118
115
|
- ol
|
|
119
|
-
- @vcsuite/ui-components
|
|
120
116
|
- vue
|
|
121
117
|
- @vue/composition-api
|
|
122
118
|
- vuetify
|
|
@@ -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>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
22
|
import { inject } from '@vue/composition-api';
|
|
23
|
-
import { VcsButton } from '@
|
|
23
|
+
import { VcsButton } from '@vcmap/ui';
|
|
24
24
|
|
|
25
25
|
export const windowId = 'hello_world_window_id';
|
|
26
26
|
|
|
@@ -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,14 +34,14 @@
|
|
|
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
|
-
"@vcmap/ui": "^5.0.0-rc.
|
|
44
|
+
"@vcmap/ui": "^5.0.0-rc.9",
|
|
45
45
|
"vue": "^2.6.14"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
package/src/build.js
CHANGED
package/src/create.js
CHANGED
|
@@ -174,7 +174,6 @@ export default async function create() {
|
|
|
174
174
|
];
|
|
175
175
|
|
|
176
176
|
const peerDependencyChoices = [
|
|
177
|
-
{ title: '@vcsuite/ui-components', value: '@vcsuite/ui-components', selected: true },
|
|
178
177
|
{ title: '@vcmap/core', value: '@vcmap/core' },
|
|
179
178
|
{ title: '@vcmap/cesium', value: '@vcmap/cesium' },
|
|
180
179
|
{ title: 'ol', value: 'ol@~6.13.0' },
|
package/src/serve.js
CHANGED
|
@@ -78,7 +78,6 @@ export default async function serve(options) {
|
|
|
78
78
|
'@vcmap/ui',
|
|
79
79
|
'@vcmap/core',
|
|
80
80
|
'ol',
|
|
81
|
-
'@vcsuite/ui-components',
|
|
82
81
|
'proj4',
|
|
83
82
|
],
|
|
84
83
|
include: [
|
|
@@ -104,6 +103,13 @@ export default async function serve(options) {
|
|
|
104
103
|
https: options.https,
|
|
105
104
|
proxy,
|
|
106
105
|
},
|
|
106
|
+
css: {
|
|
107
|
+
preprocessorOptions: {
|
|
108
|
+
sass: {
|
|
109
|
+
additionalData: "\n@import './node_modules/@vcmap/ui/src/styles/variables.scss'\n",
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
107
113
|
});
|
|
108
114
|
|
|
109
115
|
addMapConfigRoute(app, options.mapConfig, options.auth, options.config);
|