browserify-size

2019-08-14 admin

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

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-72483.html

文章标题:browserify-size

回到顶部