upcharts
v1.2.3
Published
make some descriptions here!
Downloads
6
Readme
UPCHARTS📈
UPCHARTS is a “wheel”(yeah, u konw what i mean!👀),it can help you with React Visualization Library rather than spending lots of time on how to configure these charts, and what you need to to is just input the data!
Getting Started
npm install upchart --save
or yarn upchart
, than you can import these instance in the React projects!
Development
Local
ADD LOCAL DEPENDENCY
cd example
goto example directorynpm i
add lots of npm's packages🙉
LOCAL DEVELOPMENT
npm run ex
To start the example developmentnpm run dev
To listen anything changes in ./src and move the wholesrc
directory to./example/src
npm run hbuild
To listen anything changes in ./src and rebuild the npm
Attention, i have created the npm
directory, so you can publish the npm package in this folder, so you can config the control.sh
to do something, in this case to avoid some unless dependencies!
How to build?
- do
npm install
to import some dependences - develop under
src/
directory(or you can modifyrollup.config.js
->input
to change the rule) - do
npm run build
to generateindex.js
on root,the publish it to the NPM platform
About
Support Typescript
Firstly, you need to npm install --save typescript @types/node @types/react @types/react-dom @types/jest
and npm install --save-dev @rollup/plugin-typescript
to support Typescript compile and package!
Then, we need to add some configs:
- remove
outDir
intsconfig.json
, or you will caught some errors when packing - config
types
inpackage.json
, which will take the type define file into the bundle - config
files
to open whitelist, used to publish the target files to npm
Attention: dependencies
is required to support the .d.ts
file, see publish for more details
React
In most case, you will not want to include some packages(like React
, lodash
etc) when bundle up.
You can config external: ["react", "react-dom"]
in rollup.config.js
to avoid this case, it will not the bundle up the whole react
, and will replace with var React = require('react');
, so you must ensure that you have included the react
in your project!