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

@xfe-team/webpack-build-report-enhance

v0.0.2

Published

Build a report file after a Webpack build

Downloads

1

Readme

@xfe-team/webpack-build-report-enhance

Installation

NPM

npm i @xfe-team/webpack-build-report-enhance --save-dev

Example

webpack.config.js


// Import the plugin
const BuildReportPlugin = require('@xfe-team/webpack-build-report-enhance')

// Let's say you build a library of React components. you build them one by one
const components = fs.readdirSync(`${SRC_DIR}/components/`)
const entries = {}

components.forEach(component => {
  const name = component.split('.')[0]
  entries[name] = `${SRC_DIR}/components/${name}`
})

// Add the plugin to your webpack config
const config = {
  entry: entries,
  plugins: [
    // other plugins ...,
    new BuildReportPlugin({
      assets: true,
      output: `${SRC_DIR}/doc/build-report.md`,
      ...
    })
  ]
}

// ...

module.exports = config

Configuration options

Option | Type | Default value | Description ---| --- | --- | --- append | bool | false | Appends the report to an existing .md file, based on the output option assets | bool | true | Adds the assets stats to the final report output | string | 'build-report.md' | Tell the plugin where you want your report to be saved. Must be an .md file ! saveStats | bool | false | Saves the complete build stats in .build-stats.json, and allow your report to show comparisons to the last build


After your build has finished, you'll find a build-report.md file, containing:

Build report

  • Hash: 3776828640c3fab88ac5
  • Version: webpack 1.14.0
  • Time: 2813ms
  • Generated on : December 17, 2016 4:48 PM

Assets list

Asset name | Asset size | Size difference --- | --- | --- AlertIllustration.js | 17.41 kB | +6.45 kB Button.js | 8.41 kB | - Checkbox.js | 7.26 kB | - Loader.js | 6.07 kB | -21.12 kB Modal.js | 15.93 kB | - PhoneLoader.js | 16.66 kB | -4.00 kB

ChangeLog

0.0.2 (2019/10/16)

  • fix: 修复 utils/report.js 中 LLL 在 dayjs 不生效导致生成的 report 展示错误 Date "LLL" 字符串的问题

0.0.1

  • init commit

Author

She Ailun