1.3.1 • Published 10 years ago

fannypack-images v1.3.1

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

fannypack-images

Official Fannypack task for minifying images for production.

Installation

npm install fannypack-images --save-dev

Usage

// gulpfile.js

var Fannypack = require('fannypack')

require('fannypack-images')

Fannypack.Config.images = {
  // Config.root.src + 'src' dir
  src: 'img',
  // Config.root.dest + 'dest' dir
  dest: 'assets/img',
  // Auto-run this task in dev mode?
  watchTask: true,
  assetTask: true,
  // flatten all images to destination folder?
  flatten: true,
  // File extensions to watch
  extensions: ['jpg', 'png', 'svg', 'gif']
}

Fannypack.init()

Flattening

If set to true, images within src/assets/img/home/*.jpg, src/assets/img/app/*.jpg and src/assets/img/*.jpg will ALL be merged into build/assets/img/*.jpg without retaining the subdirectories home and app.

If you want to keep any subdirectories, set flatten to false.

1.3.1

10 years ago

1.3.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago