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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mrdu/lite-cli

v2.0.5

Published

分模块打包工具

Readme

Lite-cli

这是一个分模块打包工具。通过读取项目中配置的module.config.json配置的模块文件,选取需要打包的模块,然后将该模块写入到package.json文件中。

   package.json
   
   ....
   "modules": [
        "area_line",
        "histogram",
        "stack_bar",
        "bar",
        "two_way_bar"
    ]
    ....

可以通过bat批处理命令执行打包,将打包好的文件copy到指定目录。需要注意的是,由于执行打包的npm命令是调用外部程序执行的,所以需要加上一些处理。例如:

cd E:\worker\client\insight-bi
@echo off
call npm run build:prod
echo Exit Code = %ERRORLEVEL%
if "%ERRORLEVEL%" == "1" exit /B 1
xcopy /E  E:\worker\client\insight-bi\dist  F:/

一、工具安装

1、执行npm run build在dist目录生成工具打包后的文件。

2、执行npm link将命令链接到全局。

二、工具打包配置

1、配置模块配置文件,模块配置文件名称为module.config.json。示例文件在工具目录下:

/data/module.config.json

如果需要将模块配置成树结构,示例文件:

/data/cp.module.config.json

注意:模块描述对象type属性必须唯一,对于非模块节点则不需要type属性。

2、配置执行命令。命令示例文件:

/data/bat/demo.bat

三、工具运行

1、可以在任意目录下运行命令启动打包工具。

lite-cli

2、默认在命令执行目录中读取模块配置文件。如果填写了执行路径,则从路径下开始执行。

四、工具内部存储的临时文件

1、执行命令时生成的bat文件目录。

/data/bat/

2、命令执行产生的日志目录。

/data/log/

3、存储打包工程被选择的模块目录。

/data/projects/