Socket
Socket
Sign inDemoInstall

minify-dir

Package Overview
Dependencies
50
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    minify-dir

Minify all the files under a directory.


Version published
Weekly downloads
2
Maintainers
1
Install size
3.79 MB
Created
Weekly downloads
 

Readme

Source

Build Status License: MIT

minify-dir

Minify all the files under a directory.

Install

$ npm install -g minify-dir

Usage

usage : minify-dir I_FOLDER [output O_FOLDER]

Minify-Dir : Minify all the files under a directory.

positional arguments:
  I_FOLDER          Directory you want to minified.

optional arguments:
  O_FOLDER          Output all the minified files here.

CLI

Try minify a directory.

# Default Output => `website.min`
$ minify-dir ./website

# Target Output => `website2`
$ minify-dir ./website ./website2

Or you can minify file instead of a directory.

# Default Output => `website.min/anyfile.html`
$ minify-dir ./website/anyfile.html

# Target Output => `website2/anyfile.html`
$ minify-dir ./website/anyfile.html ./website2/anyfile.html

Example Code

Include minify-dir package in your code.

const minifyDir = require('minify-dir');

Minify all files under website directory recursively, defualt will output to website.min directory.

minifyDir.minifyDirectory([source], [option destination]);

/* Default Output => `website.min` */
minifyDir.minifyDirectory("./website");

/* Target Output => `website2` */
minifyDir.minifyDirectory("./website", "./website2");

Minify a CSS/HTML/JS file, default will output to website.min/anyfile.html.

minifyDir.minifyFile([source], [option destination]);

/* Default Output => `website.min/anyfile.html` */
minifyDir.minifyFile("./website/anyfile.html");

/* Target Output => `website2/anyfile.html` */
minifyDir.minifyFile("./website/anyfile.html", "./website2/anyfile.html");

Service Provider

Keywords

FAQs

Last updated on 22 Feb 2019

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