UNPKG

2.62 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/gulp-size`
3
4# Summary
5This package contains type definitions for gulp-size (https://github.com/sindresorhus/gulp-size).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-size.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-size/index.d.ts)
10````ts
11// Type definitions for gulp-size 4.0
12// Project: https://github.com/sindresorhus/gulp-size
13// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
14// Remisery <https://github.com/remisery>
15// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
16
17/// <reference types="node" />
18
19declare namespace size {
20 interface Options {
21 /**
22 * Displays the size of every file instead of just the total size.
23 *
24 * @default false
25 */
26 showFiles?: boolean | undefined;
27
28 /**
29 * Displays the gzipped size.
30 *
31 * @default false
32 */
33 gzip?: boolean | undefined;
34
35 /**
36 * Give it a title so it's possible to distinguish the output of multiple instances logging at once.
37 *
38 * @default ''
39 */
40 title?: string | undefined;
41
42 /**
43 * Displays prettified size: 1337 B → 1.34 kB.
44 *
45 * @default true
46 */
47 pretty?: boolean | undefined;
48
49 /**
50 * Displays the total of all files.
51 *
52 * @default true
53 */
54 showTotal?: boolean | undefined;
55
56 /**
57 * Displays the brotli compressed size.
58 *
59 * @default false
60 */
61 brotli?: boolean | undefined;
62
63 /**
64 * Displays the uncompressed size.
65 *
66 * @default false
67 */
68 uncompressed?: boolean | undefined;
69 }
70
71 interface SizeStream extends NodeJS.ReadWriteStream {
72 /**
73 * The total size of all files in bytes.
74 *
75 * @example 12423000
76 */
77 size: number;
78
79 /**
80 * Prettified version of .size.
81 *
82 * @example 14 kB
83 */
84 prettySize: string;
85 }
86}
87
88declare function size(options?: size.Options): size.SizeStream;
89
90export = size;
91
92````
93
94### Additional Details
95 * Last updated: Sat, 05 Mar 2022 20:01:45 GMT
96 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
97 * Global values: none
98
99# Credits
100These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff), and [Remisery](https://github.com/remisery).
101
\No newline at end of file