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