0.0.4 • Published 10 years ago

grunt-clowncar v0.0.4

Weekly downloads
1
License
-
Repository
github
Last release
10 years ago

grunt-clowncar

Generate responsive images with clown car technique

Getting Started

This plugin requires Grunt ~0.4.1 and GraphicsMagick to be installed.

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:

Install GraphicsMagick on OSX:

brew install graphicsmagick
npm install grunt-clowncar --save-dev

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

grunt.loadNpmTasks('grunt-clowncar');

The "clowncar" task

Overview

In your project's Gruntfile, add a section named clowncar to the data object passed into grunt.initConfig().

grunt.initConfig({
  clowncar: {
    options: {
      size: [1000, 800, 600, 400]
    , quality: 75
    },
    your_target: {
      files: {
        "dist/images/content/grunt.svg": 'images/content/grunt.jpg'
      }
    },
  },
})

Options

options.sizes

Type: Array Default value: [600, 400]

Images with width as specified in the array to be generated

options.quality

Type: Number Default value: 90

Quality of the image to be generated

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • 2013-08-05 v0.0.1 Inital release
0.0.4

10 years ago

0.0.3

10 years ago

0.0.1

11 years ago