9.1.4 • Published 6 months ago

@types/minify v9.1.4

Weekly downloads
867
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/minify

Summary

This package contains type definitions for minify (http://coderaiser.github.io/minify).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/minify.

index.d.ts

// Type definitions for minify 8.0
// Project: http://coderaiser.github.io/minify
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import htmlMinifier = require('html-minifier-terser');
import cleanCSS = require('clean-css');
import terser = require('terser');

/**
 * A minifier of js, css, html and img files.
 * @async
 */
declare function minify(name: string, options?: Options): Promise<string>;

/**
 * Full documentation for options that each file type accepts
 * can be found on the pages of the libraries used by minify to process the files
 */
export interface Options {
    /**
     * see {@link https://github.com/kangax/html-minifier}
     */
    html?: htmlMinifier.Options | undefined;
    /**
     * see {@link https://github.com/jakubpawlowicz/clean-css}
     */
    css?: cleanCSS.Options | undefined;
    /**
     * see {@link https://github.com/terser/terser}
     */
    js?: terser.MinifyOptions | undefined;
    /**
     * see {@link https://github.com/Filirom1/css-base64-images}
     */
    img?:
        | {
              /**
               * bigger images are not base64 in the CSS
               * @default 4096
               */
              maxSize?: number | undefined;
          }
        | undefined;
}

export default minify;

Additional Details

Credits

These definitions were written by Piotr Błażejewicz.

9.1.4

6 months ago

9.1.3

7 months ago

9.1.2

7 months ago

9.1.1

8 months ago

9.1.0

2 years ago

9.0.0

2 years ago

8.0.0

3 years ago

6.0.1

3 years ago

6.0.0

4 years ago

5.1.0

4 years ago