Skip to content

Commit

Permalink
fix: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
s0ftik3 committed May 18, 2023
1 parent 9f15866 commit 2c6174d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "solid-chartjs",
"type": "module",
"version": "1.3.3",
"description": "SolidJS components for Chart.js",
"license": "MIT",
Expand All @@ -14,8 +15,9 @@
"dist"
],
"private": false,
"type": "module",
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"browser": {},
"typesVersions": {},
"scripts": {
Expand Down Expand Up @@ -75,8 +77,8 @@
"prettier": "^2.8.8",
"solid-js": "^1.7.5",
"tsd": "^0.28.1",
"tsup": "^6.7.0",
"tsup-preset-solid": "^0.1.8",
"tsup": "^6.5.0",
"tsup-preset-solid": "^0.0.6",
"typescript": "^5.0.4",
"vite": "^4.3.6",
"vite-plugin-solid": "^2.7.0",
Expand Down
28 changes: 22 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/index.ts → src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import DefaultChart from './chart'

export type { ChartProps } from './types.js'
export { DefaultChart }
export * from './typedCharts'
export * from 'chart.js'
1 change: 0 additions & 1 deletion src/typedCharts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import type { ChartProps } from './types'
import type { ChartType, ChartComponentLike } from 'chart.js'

export type TypedChartProps = Omit<ChartProps, 'type'>
export { DefaultChart }

function createTypedChart<T extends ChartType>(type: T, registerables: ChartComponentLike) {
Chart.register(registerables)
Expand Down
3 changes: 2 additions & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { defineConfig } from 'tsup-preset-solid'

export default defineConfig(
{
entry: 'src/index.ts',
entry: 'src/index.tsx',
devEntry: true,
dropConsole: true,
},
{
// Enable this to write export conditions to package.json
Expand Down

0 comments on commit 2c6174d

Please sign in to comment.