open-index/open-npm huggingface dataset:
npm package: @space8/vite-czm-plugin
Description: czm-plugin library plugin for Vite
Author: john
Latest version: 0.0.4

# ⚡ vite-plugin-cesium

[![npm](https://img.shields.io/npm/v/vite-plugin-cesium.svg)](https://www.npmjs.com/package/vite-plugin-cesium)
[![npm](https://img.shields.io/npm/dt/vite-plugin-cesium)](https://www.npmjs.com/package/vite-plugin-cesium)

Easily set up a [`Cesium`] project in [`Vite`].

[`cesium`]: https://github.com/CesiumGS/cesium
[`vite`]: https://github.com/vitejs/vite

**update：** if you just wanna a scaffolding by using this plugin, try a simply command `yarn create cesium`, click [create-cesium](https://www.npmjs.com/package/create-cesium) for more info.

Chinese tutorial: [中文教程](https://zhuanlan.zhihu.com/p/354856692)

## Install

```bash
npm i cesium vite-plugin-cesium vite -D
# yarn add cesium vite-plugin-cesium vite -D
```

## Usage

add this plugin to `vite.config.js`

```js
import { defineConfig } from 'vite';
import cesium from 'vite-plugin-cesium';
export default defineConfig({
  plugins: [cesium()]
});
```

add dev command to `package.json`

```json
"scripts": {
  "dev": "vite",
  "build": "vite build"
}
```

run:

`yarn dev`

## Options

**rebuildCesium**

- **Type :** `boolean`
- **Default :** `false`

Default copy min cesium file to dist. if `true` will rebuild cesium from source.

```js
import { defineConfig } from 'vite';
import cesium from 'vite-plugin-cesium';
export default defineConfig({
  plugins: [
    cesium({
      rebuildCesium: true
    })
  ]
});
```

## Demo

`src/index.js`

```js
import { Viewer } from 'cesium';
import './css/main.css';

const viewer = new Viewer('cesiumContainer');
```

> or if you like global Cesium object you can write as

```js
import * as Cesium from 'cesium';
const viewer = new Cesium.Viewer('cesiumContainer');
```

`index.html`

```html
<!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>
```

`src/css/main.css`

```css
html,
body,
#cesiumContainer {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
```

Add `dev` and `build` commands to `package.json`

```
"scripts": {
    "dev": "vite",
    "build": "vite build"
},
```

Run `yarn dev`

For full demo project please check [./demo](https://github.com/nshen/vite-plugin-cesium/tree/main/demo) folder.

##

## License

MIT
npm package: @spaceaardvark/npm-package-template
Description: Starter template for NPM packages.
Author: Space Aardvark
Latest version: 1.0.1

# npm-package-tempate

Starter template for NPM packages.

1. First, get a git-less copy of the repo.

```shell
$ npx degit git@github.com:spaceaardvark/npm-package-template.git#main [folder]
$ cd [folder]
$ git init
```

2. Review and update `package.json`, `README.md`, `CHANGELOG.md`, and `LICENSE`.

---

# PACKAGE_NAME

SUMMARY

## Features

:heavy_check_mark: FEATURE

## Install

Requires Node.js v14 or higher.

```shell
$ npm install --save @spaceaardvark/PACKAGE_NAME
```

```shell
$ yarn add @spaceaardvark/PACKAGE_NAME
```

## Usage

```javascript

```

## API

## Contributing

Be sure to create an issue before you submit a change request.

The library does not require a build step and is easy to test. See the `scripts`
section in `package.json` for more information.
npm package: @spaceavocado/type-check
Description: Collection of small javascript type check functions.
Latest version: 1.0.2

# Type Check
Collection of small javascript type check functions.

## Installation via NPM or Yarn
```npm install -D @spaceavocado/type-check``` or ```yarn add @spaceavocado/type-check -D```

## Usage
The library is built as Exported as **CommonJS** module and as **ESM** module.

### Import All Functions
```javascript
import tc from '@spaceavocado/type-check';
tc.isFunction(value);
```
The **tc** object has **not** property which holds negated version of all functions. e.g. **tc.isString()**, **tc.not.isString()**. 

### Specific Functions
```javascript
import {isFunction, isArray} from '@spaceavocado/type-check';
```

## Type Check Functions
### isString
```javascript
tc.isString('value');
// => true

tc.not.isString('value');
// => false
```

### isEmpty
Supports string and array empty check, any other types throws an error (**tc.TypeCheckError**).
```javascript
// String value
tc.isEmpty('');
// => true

// Array value
tc.isEmpty([]);
// => true

tc.isEmpty({});
// => throws tc.TypeCheckError

// String value
tc.not.isEmpty('');
// => false

// Array value
tc.not.isEmpty([]);
// => false
```

### isNumber
```javascript
tc.isNumber(5);
// => true

tc.not.isNumber(5);
// => false
```

### isFunction
```javascript
tc.isFunction(() => {});
// => true

tc.not.isFunction(() => {});
// => false
```

### isObject
```javascript
tc.isObject({});
// => true

tc.not.isObject({});
// => false
```

### isError
```javascript
tc.isError(new Error('error message'));
// => true

tc.not.isError(new Error('error message'));
// => false
```

### isNullOrUndefined
```javascript
tc.isNullOrUndefined(undefined);
// => true

tc.isNullOrUndefined(null);
// => true

tc.not.isNullOrUndefined(undefined);
// => false
```

### isArray
```javascript
tc.isArray([]);
// => true

tc.not.isArray([]);
// => false
```

### isSymbol
```javascript
tc.isSymbol(new Symbol());
// => true

tc.not.isSymbol(new Symbol());
// => false
```

### isPromise
```javascript
tc.isPromise(new Promise((resolve, reject) => {}));
// => true

tc.not.isPromise(new Promise((resolve, reject) => {}));
// => false
```

### isEnumKey
```javascript
const myEnum = {
  A: 'A',
  B: 'B',
}

tc.isEnumKey(myEnum.A, myEnum);
// => true

tc.isEnumKey('C', myEnum);
// => false

tc.not.isEnumKey(myEnum.A, myEnum);
// => false
```

## License
Svelte Router is released under the MIT license. See [LICENSE.txt](https://github.com/spaceavocado/type-check/blob/master/LICENSE.txt).