@vcmap/plugin-cli 2.1.2 → 2.1.3
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 +3 -3
- package/package.json +2 -2
- package/src/build.js +3 -3
- package/src/create.js +1 -1
- package/src/serve.js +6 -1
package/README.md
CHANGED
|
@@ -177,7 +177,7 @@ caching more readily.
|
|
|
177
177
|
The following libraries are provided by the @vcmap/ui in a deployed application. You should define these
|
|
178
178
|
as peer dependencies if you use them in your plugin:
|
|
179
179
|
- @vcmap/core
|
|
180
|
-
- @vcmap/
|
|
180
|
+
- @vcmap-cesium/engine
|
|
181
181
|
- ol
|
|
182
182
|
- vue
|
|
183
183
|
- vuetify
|
|
@@ -197,12 +197,12 @@ a plugin and _that the provided index files_ are used (over directly importing f
|
|
|
197
197
|
|
|
198
198
|
For instance:
|
|
199
199
|
```js
|
|
200
|
-
import Cartesian3 from '@vcmap
|
|
200
|
+
import Cartesian3 from '@vcmap-cesium/engine/Source/Core/Cartesian3.js';
|
|
201
201
|
```
|
|
202
202
|
|
|
203
203
|
should be rewritten to:
|
|
204
204
|
```js
|
|
205
|
-
import { Cartesian3 } from '@vcmap/
|
|
205
|
+
import { Cartesian3 } from '@vcmap-cesium/engine';
|
|
206
206
|
```
|
|
207
207
|
|
|
208
208
|
### What about openlayers?
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vcmap/plugin-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "A CLI to help develop and build plugins for the VC Map",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"vue-template-compiler": "~2.7.14"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@vcmap/ui": "^5.0.0-rc.
|
|
43
|
+
"@vcmap/ui": "^5.0.0-rc.21",
|
|
44
44
|
"vue": "~2.7.14"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
package/src/build.js
CHANGED
|
@@ -32,12 +32,12 @@ export function getDefaultConfig() {
|
|
|
32
32
|
*/
|
|
33
33
|
export async function getLibraryPaths(pluginName) {
|
|
34
34
|
const { libraries } = await import('@vcmap/ui/build/buildHelpers.js');
|
|
35
|
-
const pluginPath = path.join('plugins', ...pluginName.split('/'));
|
|
35
|
+
const pluginPath = path.posix.join('plugins', ...pluginName.split('/'));
|
|
36
36
|
const libraryPaths = {};
|
|
37
37
|
Object.entries(libraries).forEach(([library, assetName]) => {
|
|
38
|
-
const assetPath = path.join('assets', `${assetName}.js`);
|
|
38
|
+
const assetPath = path.posix.join('assets', `${assetName}.js`);
|
|
39
39
|
|
|
40
|
-
libraryPaths[library] = path.relative(pluginPath, assetPath);
|
|
40
|
+
libraryPaths[library] = path.posix.relative(pluginPath, assetPath);
|
|
41
41
|
});
|
|
42
42
|
return libraryPaths;
|
|
43
43
|
}
|
package/src/create.js
CHANGED
|
@@ -311,7 +311,7 @@ export default async function create() {
|
|
|
311
311
|
|
|
312
312
|
const peerDependencyChoices = [
|
|
313
313
|
{ title: '@vcmap/core', value: '@vcmap/core' },
|
|
314
|
-
{ title: '@vcmap/
|
|
314
|
+
{ title: '@vcmap-cesium/engine', value: '@vcmap-cesium/engine' },
|
|
315
315
|
{ title: 'ol', value: 'ol' },
|
|
316
316
|
{ title: 'vue', value: 'vue' },
|
|
317
317
|
{ title: 'vuetify', value: 'vuetify' },
|
package/src/serve.js
CHANGED
|
@@ -57,6 +57,11 @@ async function getProxy(protocol, port) {
|
|
|
57
57
|
changeOrigin: true,
|
|
58
58
|
secure: false,
|
|
59
59
|
};
|
|
60
|
+
// Cesium engine assets are not part of Build
|
|
61
|
+
proxy['/node_modules/@vcmap-cesium/engine/Build/Assets'] = {
|
|
62
|
+
target,
|
|
63
|
+
rewrite: p => p.replace(/Build/, 'Source'),
|
|
64
|
+
};
|
|
60
65
|
return proxy;
|
|
61
66
|
}
|
|
62
67
|
|
|
@@ -97,7 +102,7 @@ export default async function serve(options) {
|
|
|
97
102
|
'fast-deep-equal',
|
|
98
103
|
'rbush-knn',
|
|
99
104
|
'pbf',
|
|
100
|
-
'@vcmap/
|
|
105
|
+
'@vcmap-cesium/engine',
|
|
101
106
|
],
|
|
102
107
|
},
|
|
103
108
|
plugins: [
|