Skip to content

Commit

Permalink
[refactor] replace Dynamic Import with ES modules tree-shaking
Browse files Browse the repository at this point in the history
[remove] Node.js modules exporting
[optimize] update Upstream packages
  • Loading branch information
TechQuery committed Apr 5, 2024
1 parent ad8789a commit 2d52fb0
Show file tree
Hide file tree
Showing 10 changed files with 494 additions and 549 deletions.
13 changes: 4 additions & 9 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A real [JSX][1] wrapper for [ECharts][2] based on [TypeScript][3] & [Web compone
## Features

- [x] All kinds of options & event handlers can be write in **JSX syntax**
- [x] Async-load required modules automatically
- [x] **Tree shaking** supported based on ECMAScript 6+ modules

## Versions

Expand Down Expand Up @@ -39,11 +39,7 @@ import { render } from 'react-dom';
import 'echarts-jsx';

render(
<ec-chart
type="canvas"
theme="dark"
style={{ width: '100%', height: '75vh' }}
>
<ec-svg-chart theme="dark" style={{ width: '100%', height: '75vh' }}>
<ec-title text="ECharts Getting Started Example" />

<ec-legend data={['sales']} />
Expand All @@ -62,13 +58,12 @@ render(
/>
<ec-y-axis />

<ec-series
type="bar"
<ec-bar-chart
name="sales"
data={[5, 20, 36, 10, 10, 20]}
onClick={console.log}
/>
</ec-chart>,
</ec-svg-chart>,
document.body
);
```
Expand Down
32 changes: 6 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "echarts-jsx",
"version": "1.0.0-rc.3",
"version": "1.0.0-rc.5",
"license": "LGPL-3.0",
"author": "[email protected]",
"description": "A real JSX wrapper for ECharts based on TypeScript & Web components",
Expand All @@ -26,26 +26,6 @@
"types": "dist/index.d.ts",
"module": "dist/index.js",
"main": "dist/index.umd.js",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.umd.js"
},
"./*": [
"./dist/component/*",
"./dist/component/*.d.ts",
"./dist/chart/*",
"./dist/chart/*.d.ts"
],
"./chart": [
"./dist/chart.js",
"./dist/chart.d.ts"
]
},
"engines": {
"node": ">=16"
},
"dependencies": {
"dom-renderer": "^2.1.4",
"echarts": ">=5",
Expand All @@ -57,18 +37,18 @@
"@webcomponents/webcomponentsjs": "^2.8"
},
"devDependencies": {
"@types/lodash": "^4.14.202",
"@types/lodash": "^4.17.0",
"buffer": "^6.0.3",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"microbundle": "^0.15.1",
"open-cli": "^8.0.0",
"parcel": "~2.11.0",
"parcel": "~2.12.0",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"typedoc": "^0.25.9",
"typedoc-plugin-mdn-links": "^3.1.17",
"typescript": "~5.3.3"
"typedoc": "^0.25.12",
"typedoc-plugin-mdn-links": "^3.1.19",
"typescript": "~5.4.4"
},
"prettier": {
"singleQuote": true,
Expand Down
Loading

1 comment on commit 2d52fb0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for echarts-jsx ready!

✅ Preview
https://echarts-h8j12qpnw-techquerys-projects.vercel.app

Built with commit 2d52fb0.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.