[gulp-size] Update type definitions to v2.1.0 (#18551)

* extend api

* Add tslint.json and fix lint errors
This commit is contained in:
remisery 2017-08-02 20:12:27 +02:00 committed by Sheetal Nandi
parent e1c56878a4
commit 2425a019f2
4 changed files with 10 additions and 10 deletions

View File

@ -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});

View File

@ -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 {

View File

@ -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"
]
}
}

View File

@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}