ino-cesium 0.0.17-beta.1 → 0.0.17-beta.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 +2 -1
- package/dist/ino-cesium-full.js +6 -6
- package/dist/ino-cesium.d.ts +651 -574
- package/dist/ino-cesium.js +1 -1
- package/package.json +11 -8
- package/vite/index.d.ts +12 -0
- package/vite/index.js +69 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ino-cesium",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.17-beta.
|
|
4
|
+
"version": "0.0.17-beta.3",
|
|
5
5
|
"author": "koino",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"cesium",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./dist/index.js",
|
|
12
12
|
"./ino-css": "./dist/assets/css/ino-cesium.css",
|
|
13
|
+
"./vite": "./vite/index.js",
|
|
13
14
|
"./assets/": "./dist/assets/"
|
|
14
15
|
},
|
|
15
16
|
"typesVersions": {
|
|
@@ -22,16 +23,18 @@
|
|
|
22
23
|
},
|
|
23
24
|
"files": [
|
|
24
25
|
"dist/**",
|
|
26
|
+
"vite/**",
|
|
25
27
|
"README.MD"
|
|
26
28
|
],
|
|
27
29
|
"dependencies": {
|
|
28
|
-
"@ino-cesium/analysis": "0.0.17-beta.
|
|
29
|
-
"@ino-cesium/common": "0.0.17-beta.
|
|
30
|
-
"@ino-cesium/draw": "0.0.17-beta.
|
|
31
|
-
"@ino-cesium/effects": "0.0.17-beta.
|
|
32
|
-
"@ino-cesium/layers": "0.0.17-beta.
|
|
33
|
-
"@ino-cesium/material": "0.0.17-beta.
|
|
34
|
-
"@ino-cesium/primitive": "0.0.17-beta.
|
|
30
|
+
"@ino-cesium/analysis": "0.0.17-beta.3",
|
|
31
|
+
"@ino-cesium/common": "0.0.17-beta.3",
|
|
32
|
+
"@ino-cesium/draw": "0.0.17-beta.3",
|
|
33
|
+
"@ino-cesium/effects": "0.0.17-beta.3",
|
|
34
|
+
"@ino-cesium/layers": "0.0.17-beta.3",
|
|
35
|
+
"@ino-cesium/material": "0.0.17-beta.3",
|
|
36
|
+
"@ino-cesium/primitive": "0.0.17-beta.3",
|
|
37
|
+
"vite-plugin-static-copy": "^3.1.0"
|
|
35
38
|
},
|
|
36
39
|
"peerDependencies": {
|
|
37
40
|
"cesium": "1.131.0"
|
package/vite/index.d.ts
ADDED
package/vite/index.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 主要做根目录配置和静态资源处理,
|
|
3
|
+
* 类似vite-plugin-cesiumjs.
|
|
4
|
+
*/
|
|
5
|
+
import { viteStaticCopy } from 'vite-plugin-static-copy'
|
|
6
|
+
|
|
7
|
+
const inoCesiumBaseUrl = () => {
|
|
8
|
+
return {
|
|
9
|
+
name: 'ino-cesium-base-url',
|
|
10
|
+
enforce: 'post',
|
|
11
|
+
transformIndexHtml: {
|
|
12
|
+
order: 'post',
|
|
13
|
+
handler(_html, { server }) {
|
|
14
|
+
let scriptList = []
|
|
15
|
+
if (server) {
|
|
16
|
+
const { base, command } = server.config
|
|
17
|
+
if (command === 'serve') {
|
|
18
|
+
scriptList = [
|
|
19
|
+
{
|
|
20
|
+
tag: 'script',
|
|
21
|
+
children: ` window.INO_CESIUM_BASE_URL = '${base}node_modules/ino-cesium/src'; `,
|
|
22
|
+
injectTo: 'head-prepend',
|
|
23
|
+
},
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
scriptList = [{
|
|
29
|
+
tag: 'script',
|
|
30
|
+
children: ` window.INO_CESIUM_BASE_URL = '/ino-cesium'; `,
|
|
31
|
+
injectTo: 'head-prepend',
|
|
32
|
+
}]
|
|
33
|
+
}
|
|
34
|
+
return scriptList
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const inoCesiumStatic = (options) => {
|
|
41
|
+
let targets = []
|
|
42
|
+
if (options.copyJs) {
|
|
43
|
+
targets = [
|
|
44
|
+
{
|
|
45
|
+
src: `node_modules/ino-cesium/dist/*`,
|
|
46
|
+
dest: `ino-cesium/`,
|
|
47
|
+
},
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
targets = [
|
|
52
|
+
{
|
|
53
|
+
src: `node_modules/ino-cesium/dist/assets/*`,
|
|
54
|
+
dest: `ino-cesium/assets/`,
|
|
55
|
+
},
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const plugins = viteStaticCopy({
|
|
60
|
+
silent: true,
|
|
61
|
+
targets,
|
|
62
|
+
})
|
|
63
|
+
return plugins
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const inoCesiumVitePlugin = (options = {}) => {
|
|
67
|
+
const plugins = [inoCesiumBaseUrl(), inoCesiumStatic(options)]
|
|
68
|
+
return plugins
|
|
69
|
+
}
|