npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

echarts-optimizer

v0.2.18

Published

Downloads

10

Readme

ECharts 构建工具(Build tools)

安装 (Install)

$ [sudo] npm install -g echarts-optimizer

运行 (Run)

默认情况下,将自动查找当前目录下的 echarts/srczrender/src 作为 echartszrender 的源代码目录,并将构建结果生成在当前目录下的 dist 目录中。

${pwd}/echarts/src and ${pwd}/zrender/src are the default source directories of echarts and zrender, and the default output directory is ${pwd}/dist.

$ echarts-optimize

--debug 参数 (--debug argument)

添加 --debug 参数时,生成目录下会包含依赖分析结果。

When --debug argument is added, it will generate dependency info files in the output directory.

$ echarts-optimize --debug

指定生成目录 (Specify output directory)

通过如下方式可以指定生成目录:

You can specify the output directory.

$ echarts-optimize echarts-dist

添加配置文件 (Optimize configuration)

如果想要变更 echartszrender 的源代码目录,可以在当前目录下创建 echarts-optimize-conf.js 文件,指定 amd 配置项。配置文件是一个 NodeJS 模块,下面是一个配置文件的例子:

If you need to change the source code directories of echarts and zrender, create ${pwd}/echarts-optimize-conf.js with amd property. echarts-optimize-conf.js is a NodeJS module.

exports.modules = {
    main: {name: 'echarts/echarts'},
    parts: [
        {name: 'echarts/chart/line', weight: 100},
        {name: 'echarts/chart/bar', weight: 100},
        {name: 'echarts/chart/scatter', weight: 90},
        {name: 'echarts/chart/k', weight: 30},
        {name: 'echarts/chart/pie', weight: 90},
        {name: 'echarts/chart/radar', weight: 30},
        {name: 'echarts/chart/chord', weight: 30},
        {name: 'echarts/chart/force', weight: 30},
        {
            name: 'echarts/chart/map',
            weight: 90,
            includeShallow: [
                'echarts/util/mapData/geoJson/an_hui_geo',
                'echarts/util/mapData/geoJson/ao_men_geo',
                'echarts/util/mapData/geoJson/bei_jing_geo',
                'echarts/util/mapData/geoJson/china_geo',
                'echarts/util/mapData/geoJson/chong_qing_geo',
                'echarts/util/mapData/geoJson/fu_jian_geo',
                'echarts/util/mapData/geoJson/gan_su_geo',
                'echarts/util/mapData/geoJson/guang_dong_geo',
                'echarts/util/mapData/geoJson/guang_xi_geo',
                'echarts/util/mapData/geoJson/gui_zhou_geo',
                'echarts/util/mapData/geoJson/hai_nan_geo',
                'echarts/util/mapData/geoJson/hei_long_jiang_geo',
                'echarts/util/mapData/geoJson/he_bei_geo',
                'echarts/util/mapData/geoJson/he_nan_geo',
                'echarts/util/mapData/geoJson/hu_bei_geo',
                'echarts/util/mapData/geoJson/hu_nan_geo',
                'echarts/util/mapData/geoJson/jiang_su_geo',
                'echarts/util/mapData/geoJson/jiang_xi_geo',
                'echarts/util/mapData/geoJson/ji_lin_geo',
                'echarts/util/mapData/geoJson/liao_ning_geo',
                'echarts/util/mapData/geoJson/nei_meng_gu_geo',
                'echarts/util/mapData/geoJson/ning_xia_geo',
                'echarts/util/mapData/geoJson/qing_hai_geo',
                'echarts/util/mapData/geoJson/shang_hai_geo',
                'echarts/util/mapData/geoJson/shan_dong_geo',
                'echarts/util/mapData/geoJson/shan_xi_1_geo',
                'echarts/util/mapData/geoJson/shan_xi_2_geo',
                'echarts/util/mapData/geoJson/si_chuan_geo',
                'echarts/util/mapData/geoJson/tai_wan_geo',
                'echarts/util/mapData/geoJson/tian_jin_geo',
                'echarts/util/mapData/geoJson/world_geo',
                'echarts/util/mapData/geoJson/xiang_gang_geo',
                'echarts/util/mapData/geoJson/xin_jiang_geo',
                'echarts/util/mapData/geoJson/xi_zang_geo',
                'echarts/util/mapData/geoJson/yun_nan_geo',
                'echarts/util/mapData/geoJson/zhe_jiang_geo'
            ]
        },
        {name: 'echarts/chart/gauge', weight: 30},
        {name: 'echarts/chart/funnel', weight: 30},
        {name: 'echarts/chart/eventRiver', weight: 10}
    ]
};

exports.amd = {
    baseUrl: process.cwd(),
    packages: [
        {
            name: 'echarts',
            location: './echarts/src',
            main: 'echarts'
        },
        {
            name: 'zrender',
            location: './zrender/src',
            main: 'zrender'
        }
    ]
};