browserify-size

2019-08-14

browserify-size是什么

什么是browserify-size,Get the browserified size of a module after minification and gzipping

browserify-size使用教程帮助文档

browserify-size Build Status Greenkeeper badge

Get the browserified size of a module after minification and gzipping

Install

$ npm install --save browserify-size

For the CLI:

$ npm install --global browserify-size

Usage

API

var browserifySize = require('browserify-size')

browserifySize('xtend', callback)
//=> callback(null, 366)

CLI

# arg
$ browserify-size xtend
# stdin
$ echo xtend | browserify-size
#=> 366 B

API

browserifySize(name, [options], callback) -> undefined

name

Required Type: string

The package name or a path to a local package.

options
version

Type: string Default: ''

The package version to use. Only applies when downloading from npm.

cwd

Type: string Default: process.cwd()

callback

Required Type: function Arguments: err, bytes

A callback to be called with the number of bytes in the resulting bundle after minification and gzipping.

License

MIT © Ben Drucker


上一篇:get-package-dir
下一篇:ud
相关文章

首次访问,人机识别验证

扫描下方二维码回复 1024 获取验证码,验证完毕后 永久 无须验证

操作步骤:[打开微信]->[扫描上侧二维码]->[关注 FedJavaScript 的微信] 输入 1024 获取验证码

验证码有误,请重新输入