Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@types/minify

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/minify

TypeScript definitions for minify


Version published
Weekly downloads
1.1K
decreased by-17.36%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 08 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc