New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@djforth/ap_imagemin

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@djforth/ap_imagemin

Asset Pipeline plugin for imagemin

latest
Source
npmnpm
Version
3.0.0-pre.1
Version published
Maintainers
1
Created
Source

Asset Pipeline - Imagemin

This is a wrapper for imagemin that will eventually become a plugin for a larger project to manage the whole build process.

It can be used however on it's own. To install run:

npm install @djforth/ap_imagemin -g

Now add the configuration details to your package.json like so (N.B. These are the defaults):

"assets": {
    "images": {
      "input": "app/assets_uncompiled/images",
      "output": "public/assets",
      "ext": [
        "*.png",
        "*.gif",
        "*.jpg",
        "*.jpeg",
        "*.svg"
      ],
      "plugins": [
        [
          "imagemin-gifsicle",
          {
            "interlaced": true
          }
        ],
        [
          "imagemin-jpegtran",
          {
            "progressive": true
          }
        ],
        [
          "imagemin-optipng",
          {
            "optimizationLevel": 3
          }
        ],
        "imagemin-svgo"
      ]
    }
  }

These options are:

  • input - where it will look for your images
  • output - where it will place your compressed images (should not be the same as input)
  • extensions - What file extensions you wish to process
  • plugins and optimisation options see https://www.npmjs.com/browse/keyword/imageminplugin for all available plugins

CLI

To run with defaults or config:

asset-pipeline-imagemin

Options are:

asset-pipeline-imagemin -h

  Usage: asset-pipeline-imagemin [options]

  Options:

    -h, --help             output usage information
    -V, --version          output the version number
    -e, --ext <list>       exts to process
    -i, --input <folder>   input folder
    -o, --output <folder>  output folder
    -w, --watch            Watch scripts

Keywords

Asset

FAQs

Package last updated on 13 Jan 2017

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