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

grunt-contrib-compress

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-compress

Compress files and folders.

  • 0.4.0-rc7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
43K
decreased by-1.92%
Maintainers
2
Weekly downloads
 
Created
Source

grunt-contrib-compress Build Status

Compress files and folders.

Getting Started

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, install this plugin with this command:

npm install grunt-contrib-compress --save-dev

Compress task

Run this task with the grunt compress command.

This task is a [multi task][] so any targets, files and options should be specified according to the [multi task][] documentation. [multi task]: https://github.com/gruntjs/grunt/wiki/Configuring-tasks

Version 0.4.x of this plugin is compatible with Grunt 0.4.x. Version 0.3.x of this plugin is compatible with Grunt 0.3.x.

Node Libraries Used: archiver (for zip/tar) zlib (for gzip).

Options

archive

Type: String

This is used to define where to output the archive. Each target can only have one output file.

mode

Type: String

This is used to define which mode to use, currently supports gzip, tar, tgz (tar gzip) and zip.

Automatically detected per dest:src pair, but can be overridden per target if desired.

level (zip only)

Type: Integer Default: 1

Sets the level of archive compression.

Currently, gzip compression related options are not supported due to deficiencies in node's zlib library.

Usage Examples

compress: {
  main: {
    options: {
      archive: 'archive.zip'
    },
    files: [
      {src: ['path/*'], dest: 'internal_folder/', filter: 'isFile'}, // includes files in path
      {src: ['path/**'], dest: 'internal_folder2/'}, // includes files in path and its subdirs
      {expand: true, cwd: 'path/', src: ['**'], dest: 'internal_folder3/'}, // makes all src relative to cwd
      {flatten: true, src: ['path/**'], dest: 'internal_folder4/', filter: 'isFile'} // flattens results to a single level
    ]
  }
}

Release History

  • 2013-01-22   v0.4.0rc7   Updating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.
  • 2013-01-13   v0.4.0rc5   Updating to work with grunt v0.4.0rc5. Conversion to grunt v0.4 conventions. Replace basePath with cwd.
  • 2012-10-11   v0.3.2   Rename grunt-contrib-lib dep to grunt-lib-contrib.
  • 2012-10-08   v0.3.1   Replace zipstream package with archiver.
  • 2012-09-23   v0.3.0   General cleanup. Options no longer accepted from global config key.
  • 2012-09-17   v0.2.2   Test refactoring. No valid source check. Automatic mode detection.
  • 2012-09-09   v0.2.0   Refactored from grunt-contrib into individual repo.

Task submitted by Chris Talkington

This file was generated on Wed Jan 23 2013 10:29:21.

Keywords

FAQs

Package last updated on 06 Feb 2014

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