Socket
Socket
Sign inDemoInstall

minify-all

Package Overview
Dependencies
48
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    minify-all

A tool that minifies all .js files in a folder and its nested folders


Version published
Weekly downloads
2.4K
increased by50.98%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Minify-All

A function that minifies your javascript or css files, and all the javascript or css files in your nested folders as well. Minify-All can be used as a CLI or can be run in your code. By giving it a directory, Minify-All will walk through the depth of your folders and minify all the javascript that it sees.

Installation

> npm install -g minify-all 

Run CLI

> minify-all [folder] [compression type]

Run in your code

minifyAll function has 3 parts: directory, options, and callback, such that

minifyAll([directory], [options], [callback])

The callback outputs 2 options:

  • error: the error of each file
  • minified: the output of the minified file
Example
var minifyAll = require("minify-all");

minifyAll("./", { silent: true }, function(err){
    if(err){
        console.log(err);
    }
});

Options

  • silent If silent mode is on, then logs of which files has been found won't be displayed

  • type Determines the compression type the file should be put through. As Minify-All depends on node-minify, these types are defined by node-minify and can be found here. If a type is not specified, then by default it is uglifyjs

Keywords

FAQs

Last updated on 03 Jul 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc