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 🙏

© 2026 – Pkg Stats / Ryan Hefner

webpack-part-release

v1.0.6

Published

webpack-part-release

Readme

webpack-part-release

用于贝贝M站webpack架构下的打包任务, 通过分析代码(html, xtpl, js, less)间的依赖关系,打包受到改动影响的代码,减少webpack打包工作量,从而提高打包速度。

用法

// 1 安装
npm install webpack-part-release --save

// 2 gulpfile.js
var partRelease = require('webpack-part-release');
var webpackProdConf = require('./bin/build/webpack.prod.conf.js');
partRelease('part-release', {
    webpackConfig: webpackConfig // webpack配置文件
}); // 最简方式, 注册了名为part-release的gulp任务

gulp.task('default', ['part-release', 'xxx', 'xxx']);

// 3 运行
gulp

配置信息

partRelease('part-release', {
    source: './app/biz/', // 依赖分析路径,默认为./app/biz/
    rev: './rev/', // 存储md5信息目录,会在该目录下生成rev-manifast.json, 默认路径./bin/partRelease
    webpackConfig: webpackProdConf, // webpack配置信息[必需]
    callback: function(diffFiles, stats) { // 打包结束回调
        // diffFiles: 内容发生变化的source文件
        // stats: webpack 打包日志
    }
});

异常容灾

若发现依赖打包出现异常、改动代码并未打包,请再打包一次(会走全量打包), 并将svn版本号邮件给[email protected],让我们能更好地定位问题,谢谢支持!

性能预测

以拼团页面负责度为例,使用基于依赖分析的打包方案,
性能(单位秒): 12 + n * 5 (n: 页面数量)


本次发布修改了一个页面,打包预计时间 17s
修改了一个组件,影响了4个页面,预计时间 32s