Natural Pleistocene Monsters

    @types/minify
    TypeScript icon, indicating that this package has built-in type declarations

    6.0.1 • Public • Published

    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 6.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?: minify.Options): Promise<string>;
    
    declare namespace minify {
        /**
         * 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
         */
        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 = minify;

    Additional Details

    Credits

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

    Keywords

    none

    Install

    npm i @types/minify

    DownloadsWeekly Downloads

    1,844

    Version

    6.0.1

    License

    MIT

    Unpacked Size

    5.75 kB

    Total Files

    4

    Last publish

    Collaborators

    • types