New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mini_css

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mini_css

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Minimise your CSS files using by compressing and combining them into one file. Reduce HTTP requests, file size, and save bandwidth.

min_css compresses using Rainpress, which is a YUI like CSS compressor built in Ruby, and then merges all the CSS into one file. You can now compress hundreds of CSS files into one file, with one command.

Installation

gem install mini_css

Usage

Using mini_css is simple! You can go about it two ways:

  1. You can run it from the command line and use it as part of your deployment proceedure.
  2. You can use it as a class and use the compressed results as necessary.

Using mini_css from the command line

Using mini_css from the command line is too simple:

mini_css [-o output_file] file_name[ file_name2 ...]

You can compress one CSS file, or compress more than one, and mash them together as one big compressed file.

You can specify the location and name of the output file; it defaults to mini_cssified.css in the current working directory.

Using mini_css as a class

To use mini_css as a class, simply require the right files and you're away.

require 'rubygems'
require 'mini_css'

files = [] # Fill this aray with file paths.
Mini_CSS.compress(files) # mini_css will open them all, compress them, and mash them together

To-Do

  • Parse out @import statements, try to associate them with local files and compress them into the same files too, removing the @import statements as we go.

FAQs

Package last updated on 26 May 2010

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