Installation
npm install --save @types/gulp-ttf2woff2
Summary
This package contains type definitions for gulp-ttf2woff2 (https://github.com/nfroidure/gulp-ttf2woff2).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-ttf2woff2.
index.d.ts
/// <reference types="node"/>
import PluginError = require("plugin-error");
declare namespace ttf2woff2 {
interface Options {
/**
* Also convert files that doesn't have the .ttf extension.
*/
ignoreExt?: boolean;
/**
* Clone the file before converting him so that it will output the original file too.
*/
clone?: boolean;
}
/**
* Callback function handling the buffered content
*/
type FileTransformCallback = <TResult, TError>(
err: TError | null,
buf: Buffer | undefined,
cb: (err: PluginError<TError> | PluginError<Error> | null, buf: Buffer | undefined) => TResult,
) => TResult;
/**
* File level transform function (for use by other plugins)
*/
function fileTransform(): FileTransformCallback;
}
/**
* Create a WOFF2 font from a TTF font with Gulp
*
* @example
* const ttf2woff2 = require('gulp-ttf2woff2');
*
* gulp.task('ttf2woff2', function(){
* gulp.src(['fonts/*.ttf'])
* .pipe(ttf2woff2())
* .pipe(gulp.dest('fonts/'));
* });
*/
declare function ttf2woff2(options?: ttf2woff2.Options): NodeJS.ReadWriteStream;
export = ttf2woff2;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: @types/node, plugin-error
Credits
These definitions were written by Anatoly Pitikin.