Skip to content

Commit b022d53

Browse files
committed
Require Node.js 12
1 parent e5200f1 commit b022d53

File tree

7 files changed

+25
-30
lines changed

7 files changed

+25
-30
lines changed

.github/funding.yml

-3
This file was deleted.

.github/workflows/main.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version:
13+
- 16
1314
- 14
1415
- 12
15-
- 10
16-
- 8
1716
steps:
1817
- uses: actions/checkout@v2
19-
- uses: actions/setup-node@v1
18+
- uses: actions/setup-node@v2
2019
with:
2120
node-version: ${{ matrix.node-version }}
2221
- run: npm install

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ module.exports = (options = {}) => {
113113
}, function (callback) {
114114
this.size = totalSize.values().next().value;
115115
this.prettySize = prettyBytes(this.size);
116+
116117
if (!(fileCount === 1 && options.showFiles) && hasSize(totalSize) && fileCount > 0 && options.showTotal) {
117118
log(chalk.green('all files'), totalSize);
118119
}

license

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
3+
Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

package.json

+11-10
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
"description": "Display the size of your project",
55
"license": "MIT",
66
"repository": "sindresorhus/gulp-size",
7+
"funding": "https://github.com/sponsors/sindresorhus",
78
"author": {
89
"name": "Sindre Sorhus",
910
"email": "[email protected]",
10-
"url": "sindresorhus.com"
11+
"url": "https://sindresorhus.com"
1112
},
1213
"engines": {
13-
"node": ">=8"
14+
"node": ">=12"
1415
},
1516
"scripts": {
1617
"test": "xo && mocha"
@@ -32,18 +33,18 @@
3233
],
3334
"dependencies": {
3435
"brotli-size": "^4.0.0",
35-
"chalk": "^2.3.0",
36-
"fancy-log": "^1.3.2",
37-
"gzip-size": "^5.1.1",
36+
"chalk": "^4.1.1",
37+
"fancy-log": "^1.3.3",
38+
"gzip-size": "^6.0.0",
3839
"plugin-error": "^1.0.1",
39-
"pretty-bytes": "^5.3.0",
40+
"pretty-bytes": "^5.6.0",
4041
"stream-counter": "^1.0.0",
41-
"through2": "^3.0.1"
42+
"through2": "^4.0.2"
4243
},
4344
"devDependencies": {
44-
"mocha": "^6.2.0",
45-
"vinyl": "^2.1.0",
46-
"xo": "^0.24.0"
45+
"mocha": "^8.3.2",
46+
"vinyl": "^2.2.1",
47+
"xo": "^0.39.1"
4748
},
4849
"peerDependencies": {
4950
"gulp": ">=4"

readme.md

+9-12
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@
66

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

9-
109
## Install
1110

1211
```
1312
$ npm install --save-dev gulp-size
1413
```
1514

16-
1715
## Usage
1816

1917
```js
@@ -27,7 +25,6 @@ exports.default = () => (
2725
);
2826
```
2927

30-
3128
## API
3229

3330
### size(options?)
@@ -38,63 +35,63 @@ Type: `object`
3835

3936
##### title
4037

41-
Type: `string`<br>
38+
Type: `string`\
4239
Default: `''`
4340

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

4643
##### gzip
4744

48-
Type: `boolean`<br>
45+
Type: `boolean`\
4946
Default: `false`
5047

5148
Displays the gzipped size.
5249

5350
##### brotli
5451

55-
Type: `boolean`<br>
52+
Type: `boolean`\
5653
Default: `false`
5754

5855
Displays the brotli compressed size.
5956

6057
##### uncompressed
6158

62-
Type: `boolean`<br>
59+
Type: `boolean`\
6360
Default: `false` if either of gzip or brotli is `true`, otherwise `true`
6461

6562
Displays the uncompressed size.
6663

6764
##### pretty
6865

69-
Type: `boolean`<br>
66+
Type: `boolean`\
7067
Default: `true`
7168

7269
Displays prettified size: `1337 B``1.34 kB`.
7370

7471
##### showFiles
7572

76-
Type: `boolean`<br>
73+
Type: `boolean`\
7774
Default: `false`
7875

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

8178
##### showTotal
8279

83-
Type: `boolean`<br>
80+
Type: `boolean`\
8481
Default: `true`
8582

8683
Displays the total of all files.
8784

8885
### size.size
8986

90-
Type: `number`<br>
87+
Type: `number`\
9188
Example: `12423000`
9289

9390
The total size of all files in bytes.
9491

9592
### size.prettySize
9693

97-
Type: `string`<br>
94+
Type: `string`\
9895
Example: `14 kB`
9996

10097
Prettified version of `.size`.

test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const path = require('path');
33
const assert = require('assert');
44
const Vinyl = require('vinyl');
55
const through = require('through2');
6-
const size = require('.');
6+
const size = require('./index.js');
77

88
it('should show the size of files in the stream', callback => {
99
const out = process.stdout.write.bind(process.stdout);

0 commit comments

Comments
 (0)