1.0.0 • Published 4 years ago

grunt-optidash v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago


Installation

$ npm install grunt-optidash --save-dev

Quick example

const grunt = require("grunt");
const optidash = require("grunt-optidash");

grunt.initConfig({
    optidash: {
        options: {
            key: "your-optidash-api-key"
        },
        dynamic: {
            files: [{
                expand: true,
                cwd: "src/",
                src: ["**/*.{png,jpg,jpeg,gif,svg,webp}"],
                dest: "dist/"
            }]
        }
    }
});

grunt.loadNpmTasks("grunt-optidash");
grunt.registerTask("default", ["optidash"]);

Options

{
    key: "optidash-api-key",
    compression: "medium",
    concurrency: 6
}

key

Your Optidash API Key. If you don't have your API Key just yet, you can sign-up for a free account which comes with a monthly quota of 500 API calls.

  • type: string
  • default: ""

compression

Controls compression and optimization mode as described in the Optidash API Docs.

  • type: string
  • values: lossless | low | medium | high
  • default: medium

concurrency

Controls the maxium number of input images that may be performed in parallel.

  • type: number
  • values: 1 - 16
  • default: 6

License

This software is distributed under the MIT License. See the LICENSE file for more information.