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

ekit-minify

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ekit-minify

Minifier of js, css, html and img (extended from orginial minify package. Checkout at: https://npmjs.org/package/minify)

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Minify v0.2.1 NPM version Dependency Status Build Status

Flattr

Minify - a minifier of js, css, html and img files, used in Cloud Commander project.

Install

You can install minify just like that:

npm i minify

or

git clone git://github.com/coderaiser/minify

Command Line

For use in command line just write something like:

minify <input-file> <output-file>

or just

minify <input-file>>

to see output in screen.

API

Minify module contains some api for interacting from another js files.

To use Minify functions it sould be connected first. It's doing like always.

minify = require('minify');

All of minification functions save files in ./min directory with extension .min (*.min.js, *.min.css, *.min.html). If directory could be created minify.MinFolder would countain stirng 'min/', in any other case - '/'.

optimize(pFiles_a) - function which minificate js, html and css-files.

  • pFiles_a - varible, wich contain array of file names or string, if name single.
  • pOptions(optional) - object contain main options.

Examples:

minify.optimize('client.js');
minify.optimize('client.js', {
    callback: func(pMinData){}
});

if a couple files:

minify.optimize(['client.js',
    'style.css']);

if post processing needed

minify.optimize({
    'client.js' : function(pFinalCode){}
});

if post image converting needed (works with css only)

minify.optimize([{'style.css': {img: true, merge: true} },
    'index.html']);

if only need the name of minified file (from min directory)

minify.optimize('client.js', {
    returnName  : true
    callback    : function(pParams){
        var lName = pParams && pParams.name;
        console.log(lName)
    }
});

MinFolder - varible thet contains folder name, where minimized files stored. (could not be changed for now).

Additional modules:

Install addtitional modules:

npm i uglify-js clean-css html-minifier css-b64-images

Contributing

If you would like to contribute - send pull request to dev branch. Getting dev version of Minify:

git clone git://github.com/coderaiser/minify.git
git checkout dev

Version history

Copycat from https://github.com/coderaiser/minify because of some specific reasons!

Keywords

FAQs

Package last updated on 30 Aug 2013

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