diff --git a/package.json b/package.json index 9d6285c..cf1df5d 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", - "package": "svelte-kit sync && svelte-package && publint", + "package": "svelte-kit sync && svelte-package -i ./src/lib/svelte-echarts && publint", "prepublishOnly": "npm run package", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", diff --git a/src/lib/index.ts b/src/lib/index.ts deleted file mode 100644 index f09a8be..0000000 --- a/src/lib/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as Chart } from '$lib/components/Chart.svelte' -export type { ECMouseEvent, ECInteractionEvent } from '$lib/constants/events' diff --git a/src/lib/components/Chart.svelte b/src/lib/svelte-echarts/components/Chart.svelte similarity index 94% rename from src/lib/components/Chart.svelte rename to src/lib/svelte-echarts/components/Chart.svelte index 2433118..4824863 100644 --- a/src/lib/components/Chart.svelte +++ b/src/lib/svelte-echarts/components/Chart.svelte @@ -3,7 +3,7 @@ import type { init as coreInit, EChartsType as CoreEchartsType } from 'echarts/core' import type { EChartsOption, EChartsInitOpts } from 'echarts' import { createEventDispatcher } from 'svelte' - import { EVENT_NAMES, type EventHandlers } from '$lib/constants/events' + import { EVENT_NAMES, type EventHandlers } from '$lib/svelte-echarts/constants/events' import type { Action } from 'svelte/action' export let init: typeof baseInit | typeof coreInit diff --git a/src/lib/constants/events.ts b/src/lib/svelte-echarts/constants/events.ts similarity index 100% rename from src/lib/constants/events.ts rename to src/lib/svelte-echarts/constants/events.ts diff --git a/src/lib/svelte-echarts/index.ts b/src/lib/svelte-echarts/index.ts new file mode 100644 index 0000000..bd3aa0e --- /dev/null +++ b/src/lib/svelte-echarts/index.ts @@ -0,0 +1,2 @@ +export { default as Chart } from '$lib/svelte-echarts/components/Chart.svelte' +export type { ECMouseEvent, ECInteractionEvent } from '$lib/svelte-echarts/constants/events' diff --git a/src/lib/types.ts b/src/lib/svelte-echarts/types.ts similarity index 100% rename from src/lib/types.ts rename to src/lib/svelte-echarts/types.ts diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index db8a7ee..9ea90b5 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,7 +1,6 @@ diff --git a/src/routes/examples/classic/+page.svelte b/src/routes/examples/classic/+page.svelte index 20eba03..1c96672 100644 --- a/src/routes/examples/classic/+page.svelte +++ b/src/routes/examples/classic/+page.svelte @@ -1,7 +1,6 @@ @@ -50,4 +43,4 @@