@vcmap/plugin-cli 2.1.3 → 2.1.4
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/assets/.gitlab-ci.yml +2 -2
- package/assets/build/staging/Dockerfile +2 -0
- package/package.json +2 -2
- package/src/create.js +6 -1
- package/src/preview.js +3 -1
- package/src/serve.js +5 -0
package/assets/.gitlab-ci.yml
CHANGED
|
@@ -147,8 +147,8 @@ version:
|
|
|
147
147
|
- npm version patch -m "%s [skip-ci]"
|
|
148
148
|
- TAG=`git describe --abbrev=0`
|
|
149
149
|
- echo git push git@gitlab:vcsuite/"$CI_PROJECT_PATH".git
|
|
150
|
-
- git push git@gitlab:
|
|
151
|
-
- git push git@gitlab:
|
|
150
|
+
- git push git@gitlab:"$CI_PROJECT_PATH".git $TAG
|
|
151
|
+
- git push git@gitlab:"$CI_PROJECT_PATH".git HEAD:$CI_COMMIT_REF_NAME
|
|
152
152
|
before_script:
|
|
153
153
|
- mkdir -p ~/.ssh
|
|
154
154
|
- chmod 700 ~/.ssh
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vcmap/plugin-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
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.22",
|
|
44
44
|
"vue": "~2.7.14"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
package/src/create.js
CHANGED
|
@@ -211,7 +211,7 @@ async function createPluginTemplate(options, pluginPath) {
|
|
|
211
211
|
devDeps.push('@vcsuite/eslint-config');
|
|
212
212
|
}
|
|
213
213
|
if (installVitest) {
|
|
214
|
-
devDeps.push('
|
|
214
|
+
devDeps.push('vitest', '@vitest/coverage-c8', 'jest-canvas-mock', 'jsdom');
|
|
215
215
|
}
|
|
216
216
|
await installDeps(devDeps, DepType.DEV, pluginPath);
|
|
217
217
|
logger.success('Installed dependencies');
|
|
@@ -279,6 +279,11 @@ async function createPlugin(options) {
|
|
|
279
279
|
path.join(getDirname(), '..', 'assets', '.gitlab-ci.yml'),
|
|
280
280
|
path.join(pluginPath, '.gitlab-ci.yml'),
|
|
281
281
|
);
|
|
282
|
+
await fs.promises.cp(
|
|
283
|
+
path.join(getDirname(), '..', 'assets', 'build'),
|
|
284
|
+
path.join(pluginPath, 'build'),
|
|
285
|
+
{ recursive: true },
|
|
286
|
+
);
|
|
282
287
|
}
|
|
283
288
|
|
|
284
289
|
if (options.template) {
|
package/src/preview.js
CHANGED
|
@@ -42,7 +42,9 @@ async function getServerOptions(hostedVcm, https) {
|
|
|
42
42
|
let proxy;
|
|
43
43
|
const normalLibraries = await getLibraryPaths('normal');
|
|
44
44
|
const scopedLibraries = await getLibraryPaths('@scoped/plugin');
|
|
45
|
-
const alias = {
|
|
45
|
+
const alias = {
|
|
46
|
+
'@cesium/engine': '@vcmap-cesium/engine',
|
|
47
|
+
};
|
|
46
48
|
setAliases(alias, normalLibraries);
|
|
47
49
|
setAliases(alias, scopedLibraries);
|
|
48
50
|
|
package/src/serve.js
CHANGED
|
@@ -91,6 +91,11 @@ export default async function serve(options) {
|
|
|
91
91
|
const server = await createServer({
|
|
92
92
|
root: getContext(),
|
|
93
93
|
publicDir: false,
|
|
94
|
+
resolve: {
|
|
95
|
+
alias: {
|
|
96
|
+
'@cesium/engine': '@vcmap-cesium/engine',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
94
99
|
optimizeDeps: {
|
|
95
100
|
exclude: [
|
|
96
101
|
'@vcmap/ui',
|