🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

svelte-echarts

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-echarts - npm Package Compare versions

Comparing version

to
0.0.2

.devcontainer/devcontainer.json

50

package.json
{
"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.