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

grunt-css-include-combine

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

grunt-css-include-combine

Grunt task to combine CSS files by @include instruction

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

grunt-css-include-combine

. Compress CSS files.

. Combine files via @include

. npm install grunt-css-include-combine -l

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-contrib-cssmin --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-contrib-cssmin');

This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that you upgrade, but in case you can't please use v0.3.2.

Combine and Minimize CSS files

Create a main CSS file with your include's instructions, like:



@include("jquery-mobile/jquery-mobile.css");
@include("bootstrap/bootstrap.css");

Then, on your Gruntfile:


grunt.initConfig({

	'css-include-combine': {
  
	    'libs': {

	    	// include's on CSS will use this PATH as it's relative 
	    	// path. This also is applied to resources url's.
	        relativeDir: 'path',

	        // your main file (see example above)
	        main: 'libsDependencies.css',

	        // the generated file
	        out: '3rdPartyLibs.css'

	    }

 	}	

});


grunt.loadNpmTasks('grunt-css-include-combine');


By typing on command line the following will generate the 3rd party libs minified file. If you want to add more file just edit the CSS main file and run Grunt!

grunt "css-include-combine:libs"

Keywords

FAQs

Package last updated on 19 Jul 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