New types for Gulp-html-prettify (#35005)

* clear to tests

* clear to tests
This commit is contained in:
TokugawaT_YD 2019-04-27 06:19:33 +09:00 committed by Pranav Senthilnathan
parent b5d9b16a73
commit c9e7cb88b0
4 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,11 @@
import * as gulp from 'gulp';
import prettifyHtml = require('gulp-html-prettify');
gulp.task('prettifyHtml', () => {
gulp.src('source/*.html')
.pipe(prettifyHtml({
indent_char: ' ',
indent_size: 2
}))
.pipe(gulp.dest('./dist/'));
});

18
types/gulp-html-prettify/index.d.ts vendored Normal file
View File

@ -0,0 +1,18 @@
// Type definitions for npm i gulp-html-prettify 0.0
// Project: https://www.npmjs.com/package/gulp-html-prettify
// Definitions by: Takesi Tokugawa <https://github.com/TokugawaTakesi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node"/>
interface GulpHtmlPrettifyOptions {
indent_char?: string;
indent_size?: number;
}
interface GulpHtmlPrettify {
(options?: GulpHtmlPrettifyOptions): NodeJS.ReadWriteStream;
}
declare var gulpHtmlPrettify: GulpHtmlPrettify;
export = gulpHtmlPrettify;

View File

@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"esModuleInterop": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"gulp-html-prettify-tests.ts"
]
}

View File

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