All Projects → sindresorhus → Gulp Size

sindresorhus / Gulp Size

Licence: mit
Display the size of your project

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gulp Size

Badge Size
🍻 Displays the size of a given file in your repository.
Stars: ✭ 277 (+23.11%)
Mutual labels:  size, gzip
Minification Benchmarks
🏃‍♂️🏃‍♀️🏃 JS minification benchmarks: babel-minify, esbuild, terser, uglify-js, swc, google closure compiler
Stars: ✭ 271 (+20.44%)
Mutual labels:  size, gzip
Gulp Stylelint
Gulp plugin for running Stylelint results through various reporters.
Stars: ✭ 149 (-33.78%)
Mutual labels:  gulp-plugin
Turbobench
Compression Benchmark
Stars: ✭ 211 (-6.22%)
Mutual labels:  gzip
Compress
Optimized Go Compression Packages
Stars: ✭ 2,478 (+1001.33%)
Mutual labels:  gzip
Gulp Imagemin
Minify PNG, JPEG, GIF and SVG images
Stars: ✭ 1,860 (+726.67%)
Mutual labels:  gulp-plugin
Gulp Compass
Compass plugin for gulp
Stars: ✭ 177 (-21.33%)
Mutual labels:  gulp-plugin
Libarchivejs
Archive library for browsers
Stars: ✭ 145 (-35.56%)
Mutual labels:  gzip
Gulp Debug
Debug Vinyl file streams to see what files are run through your Gulp pipeline
Stars: ✭ 223 (-0.89%)
Mutual labels:  gulp-plugin
Uzlib
Radically unbloated DEFLATE/zlib/gzip compression/decompression library. Can decompress any gzip/zlib data, and offers simplified compressor which produces gzip-compatible output, while requiring much less resources (and providing less compression ratio of course).
Stars: ✭ 168 (-25.33%)
Mutual labels:  gzip
Vue Cli4 Config
vue-cli4配置vue.config.js持续更新
Stars: ✭ 2,539 (+1028.44%)
Mutual labels:  gzip
Gulp Markdown
Markdown to HTML
Stars: ✭ 167 (-25.78%)
Mutual labels:  gulp-plugin
Nginxconfig.io
⚙️ NGINX config generator on steroids 💉
Stars: ✭ 14,983 (+6559.11%)
Mutual labels:  gzip
Gulp Webp
Convert images to WebP
Stars: ✭ 187 (-16.89%)
Mutual labels:  gulp-plugin
Reactql
Universal React+GraphQL starter kit: React 16, Apollo 2, MobX, Emotion, Webpack 4, GraphQL Code Generator, React Router 4, PostCSS, SSR
Stars: ✭ 1,833 (+714.67%)
Mutual labels:  gzip
Compression
Node.js compression middleware
Stars: ✭ 2,506 (+1013.78%)
Mutual labels:  gzip
Tinydeflate
A deflate/gzip decompressor that requires minimal amount of memory to work
Stars: ✭ 148 (-34.22%)
Mutual labels:  gzip
Bit7z
A C++ static library offering a clean and simple interface to the 7-zip DLLs.
Stars: ✭ 159 (-29.33%)
Mutual labels:  gzip
Gulp Traceur
Traceur is a JavaScript.next to JavaScript-of-today compiler
Stars: ✭ 172 (-23.56%)
Mutual labels:  gulp-plugin
Component Size
React hook for determining the size of a component
Stars: ✭ 224 (-0.44%)
Mutual labels:  size

gulp-size

Display the size of your project

Logs out the total size of files in the stream and optionally the individual file-sizes.

Install

$ npm install --save-dev gulp-size

Usage

const gulp = require('gulp');
const size = require('gulp-size');

exports.default = () => (
	gulp.src('fixture.js')
		.pipe(size())
		.pipe(gulp.dest('dist'))
);

API

size(options?)

options

Type: object

title

Type: string
Default: ''

Give it a title so it's possible to distinguish the output of multiple instances logging at once.

gzip

Type: boolean
Default: false

Displays the gzipped size instead.

pretty

Type: boolean
Default: true

Displays prettified size: 1337 B1.34 kB.

showFiles

Type: boolean
Default: false

Displays the size of every file instead of just the total size.

showTotal

Type: boolean
Default: true

Displays the total of all files.

size.size

Type: number
Example: 12423000

The total size of all files in bytes.

size.prettySize

Type: string
Example: 14 kB

Prettified version of .size.

Useful for, for example, reporting the total project size with gulp-notify:

const gulp = require('gulp');
const size = require('gulp-size');
const notify = require('gulp-notify');

exports.default = () => {
	const s = size();

	return gulp.src('fixture.js')
		.pipe(s)
		.pipe(gulp.dest('dist'))
		.pipe(notify({
			onLast: true,
			message: () => `Total size ${s.prettySize}`
		}));
};
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].