svelte-echarts
Advanced tools
Comparing version
{ | ||
"name": "svelte-echarts", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"scripts": { | ||
"dev": "svelte-kit dev", | ||
"build": "svelte-kit build", | ||
"preview": "svelte-kit preview", | ||
"check": "svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", | ||
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .", | ||
"format": "prettier --ignore-path .,gitignore --write --plugin-search-dir=. .", | ||
"package": "svelte-kit package", | ||
"publish": "cd package && npm publish" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-static": "^1.0.0-next.21", | ||
"@sveltejs/kit": "next", | ||
"@typescript-eslint/eslint-plugin": "^4.31.1", | ||
"@typescript-eslint/parser": "^4.31.1", | ||
"echarts": "^5.2.2", | ||
"eslint": "^7.32.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-svelte3": "^3.2.1", | ||
"prettier": "^2.4.1", | ||
"prettier-plugin-svelte": "^2.4.0", | ||
"svelte": "^3.42.6", | ||
"svelte-check": "^2.2.6", | ||
"@typescript-eslint/eslint-plugin": "^5.15.0", | ||
"@typescript-eslint/parser": "^5.15.0", | ||
"echarts": "^5.3.1", | ||
"eslint": "^8.11.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-svelte3": "^3.4.1", | ||
"prettier": "^2.6.0", | ||
"prettier-plugin-svelte": "^2.6.0", | ||
"svelte": "^3.46.4", | ||
"svelte-check": "^2.4.6", | ||
"svelte-echarts": "file:package", | ||
"svelte-preprocess": "^4.9.4", | ||
"svelte2tsx": "^0.4.10", | ||
"svelte-preprocess": "^4.10.4", | ||
"svelte2tsx": "^0.5.6", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.4.3" | ||
"typescript": "^4.6.2" | ||
}, | ||
"type": "module", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
"./Chart.svelte": "./Chart.svelte", | ||
".": "./index.js" | ||
}, | ||
"svelte": "./index.js" | ||
} | ||
"type": "module" | ||
} |
@@ -1,38 +0,44 @@ | ||
# create-svelte | ||
# svelte-echarts | ||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte); | ||
A simple [ECharts](https://echarts.apache.org/) component for [Svelte](https://svelte.dev/)! Check out this [demo](https://bherbruck.github.io/svelte-echarts/). | ||
## Creating a project | ||
## 💿 Installation | ||
If you're seeing this, you've probably already done this step. Congrats! | ||
```bash | ||
# create a new project in the current directory | ||
npm init svelte@next | ||
# create a new project in my-app | ||
npm init svelte@next my-app | ||
npm i -D svelte-echarts echarts | ||
``` | ||
> Note: the `@next` is temporary | ||
## ⌨️ Usage [demo](https://bherbruck.github.io/svelte-echarts/minimal/) | ||
## Developing | ||
```html | ||
<script> | ||
import { Chart } from 'svelte-echarts' | ||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
const options = { | ||
xAxis: { | ||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], | ||
type: 'category', | ||
}, | ||
yAxis: { | ||
type: 'value', | ||
}, | ||
series: [ | ||
{ | ||
data: [820, 932, 901, 934, 1290, 1330, 1320], | ||
type: 'bar', | ||
}, | ||
], | ||
} | ||
</script> | ||
```bash | ||
npm run dev | ||
<div class="app"> | ||
<Chart {options} /> | ||
</div> | ||
# or start the server and open the app in a new browser tab | ||
npm run dev -- --open | ||
<style> | ||
.app { | ||
width: 100vw; | ||
height: 100vh; | ||
} | ||
</style> | ||
``` | ||
## Building | ||
Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then: | ||
```bash | ||
npm run build | ||
``` | ||
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production. |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
13901
217.3%20
233.33%177
391.67%45
15.38%17
6.25%3
200%1
Infinity%