mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[gulp-size] Update type definitions to v2.1.0 (#18551)
* extend api * Add tslint.json and fix lint errors
This commit is contained in:
parent
e1c56878a4
commit
2425a019f2
@ -1,6 +1,3 @@
|
||||
|
||||
|
||||
|
||||
import * as gulp from 'gulp';
|
||||
import * as size from 'gulp-size';
|
||||
import * as debug from 'gulp-debug';
|
||||
@ -11,9 +8,8 @@ gulp.task('default', () =>
|
||||
.pipe(gulp.dest('dist'))
|
||||
);
|
||||
|
||||
|
||||
gulp.task('default', () => {
|
||||
var s = size();
|
||||
let s = size();
|
||||
|
||||
return gulp.src('fixture.js')
|
||||
.pipe(s)
|
||||
@ -21,6 +17,5 @@ gulp.task('default', () => {
|
||||
.pipe(debug({title: 'Total size ' + s.prettySize}));
|
||||
});
|
||||
|
||||
|
||||
size();
|
||||
size({showFiles: true, gzip: true});
|
||||
|
||||
6
types/gulp-size/index.d.ts
vendored
6
types/gulp-size/index.d.ts
vendored
@ -1,16 +1,18 @@
|
||||
// Type definitions for gulp-size v1.2.3
|
||||
// Type definitions for gulp-size 2.1
|
||||
// Project: https://github.com/sindresorhus/gulp-size
|
||||
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// Remisery <https://github.com/remisery>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
declare namespace size {
|
||||
interface Options {
|
||||
showFiles?: boolean;
|
||||
gzip?: boolean;
|
||||
title?: string;
|
||||
pretty?: boolean;
|
||||
showTotal?: boolean;
|
||||
}
|
||||
|
||||
interface SizeStream extends NodeJS.ReadWriteStream {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
@ -22,4 +22,4 @@
|
||||
"index.d.ts",
|
||||
"gulp-size-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
3
types/gulp-size/tslint.json
Normal file
3
types/gulp-size/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user