refactor: 重命名为vite-plugin-earth
This commit is contained in:
parent
5702d7c7fb
commit
328aca1489
16
README.md
16
README.md
|
@ -1,6 +1,6 @@
|
|||
# ⚡ vite-plugin-ice-mars3d
|
||||
# ⚡ vite-plugin-earth
|
||||
|
||||
Easily set up a [`Cesium`] project in [`Vite`].
|
||||
Easily set up a [`Cesium`] & [`mars3d`] project in [`Vite`].
|
||||
|
||||
[`cesium`]: https://github.com/CesiumGS/cesium
|
||||
[`mars3d`]: https://mars3d.cn/
|
||||
|
@ -8,8 +8,8 @@ Easily set up a [`Cesium`] project in [`Vite`].
|
|||
## Install
|
||||
|
||||
```bash
|
||||
npm i cesium vite-plugin-ice-mars3d vite -D
|
||||
# yarn add cesium vite-plugin-ice-mars3d vite -D
|
||||
npm i cesium vite-plugin-earth vite -D
|
||||
# yarn add cesium vite-plugin-earth vite -D
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
@ -18,9 +18,9 @@ add this plugin to `vite.config.js`
|
|||
|
||||
```js
|
||||
import { defineConfig } from 'vite';
|
||||
import mars3dPlugin from 'vite-plugin-ice-mars3d';
|
||||
import earthPlugin from 'vite-plugin-earth';
|
||||
export default defineConfig({
|
||||
plugins: [mars3dPlugin()]
|
||||
plugins: [earthPlugin()]
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -48,10 +48,10 @@ Default copy min cesium file to dist. if `true` will rebuild cesium from source.
|
|||
|
||||
```js
|
||||
import { defineConfig } from 'vite';
|
||||
import mars3dPlugin from 'vite-plugin-ice-mars3d';
|
||||
import earthPlugin from 'vite-plugin-earth';
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
mars3dPlugin({
|
||||
earthPlugin({
|
||||
rebuildCesium: true
|
||||
})
|
||||
]
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<!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>cesium-vite</title>
|
||||
<script type="module" src="/src/index.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="cesiumContainer"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"name": "cesium-demo",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite build && vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cesium": "^1.88.0",
|
||||
"vite": "^2.7.1",
|
||||
"vite-plugin-cesium": "^1.2.13"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
html, body, #cesiumContainer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
/**
|
||||
* You can also import Cesium Object like this
|
||||
*
|
||||
* import * as Cesium from 'cesium';
|
||||
* const viewer = new Cesium.Viewer('cesiumContainer');
|
||||
*/
|
||||
|
||||
import { Viewer } from 'cesium';
|
||||
import './css/main.css';
|
||||
|
||||
const viewer = new Viewer('cesiumContainer');
|
|
@ -1,5 +0,0 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import cesium from 'vite-plugin-cesium';
|
||||
export default defineConfig({
|
||||
plugins: [cesium()]
|
||||
});
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "vite-plugin-ice-mars3d",
|
||||
"version": "1.0.10",
|
||||
"description": "mars3d library plugin for Vite",
|
||||
"name": "vite-plugin-earth",
|
||||
"version": "1.0.0",
|
||||
"description": "mars3d&cesium library plugin for Vite",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
|
@ -41,6 +41,7 @@
|
|||
"vite": "^2.7.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"mars3d-cesium": "^1.88.0"
|
||||
"mars3d-cesium": "^1.90.0",
|
||||
"mars3d": "^3.2.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue