feat: 使用pnpm进行包管理
This commit is contained in:
14
packages/mars3d/index.html
Normal file
14
packages/mars3d/index.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>demo-mars3d</title>
|
||||
<script type="module" src="/src/index.ts"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="mars3dContainer"></div>
|
||||
</body>
|
||||
</html>
|
20
packages/mars3d/package.json
Normal file
20
packages/mars3d/package.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "mars3d-demo",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite build && vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite": "^4.3.4",
|
||||
"vite-plugin-earth": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@turf/turf": "^6.5.0",
|
||||
"mars3d": "^3.5.4",
|
||||
"mars3d-cesium": "^1.104.3"
|
||||
}
|
||||
}
|
9
packages/mars3d/src/css/main.css
Normal file
9
packages/mars3d/src/css/main.css
Normal file
@ -0,0 +1,9 @@
|
||||
html,
|
||||
body,
|
||||
#mars3dContainer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
11
packages/mars3d/src/index.ts
Normal file
11
packages/mars3d/src/index.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import * as mars3d from 'mars3d';
|
||||
import './css/main.css';
|
||||
import 'mars3d/dist/mars3d.css';
|
||||
/**
|
||||
*
|
||||
* import * as mars3d from 'mars3d';
|
||||
* const map = new mars3d.Map('mars3dContainer', {});
|
||||
*
|
||||
*
|
||||
*/
|
||||
const map = new mars3d.Map('mars3dContainer', {});
|
10
packages/mars3d/vite.config.ts
Normal file
10
packages/mars3d/vite.config.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { mars3dPlugin } from 'vite-plugin-earth';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
mars3dPlugin({
|
||||
useCDN: true
|
||||
})
|
||||
]
|
||||
});
|
Reference in New Issue
Block a user