JSPM

gulp-jimp-wrapper

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q23333F
  • License MIT

Manipulates images using Jimp.

Package Exports

  • gulp-jimp-wrapper

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-jimp-wrapper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

gulp-jimp-wrapper

Manipulates images using Jimp.

npm Travis CI Codecov Libraries.io dependency status for latest release Renovate enabled

Install

npm install --save-dev gulp-jimp-wrapper

Usage

const { src, dest } = require('gulp')
const jimp = require('gulp-jimp-wrapper')

exports.default = () => {
  return src('./src/img/*')
    .pipe(
      jimp(image => image.resize(256, 256).quality(60).greyscale(), {
        extname: '.min.png'
      })
    )
    .pipe(dest('./dist/img'))
}

or use ES module

import jimp from 'gulp-jimp-wrapper'

API

type Callback = (image: Jimp ) => Jimp
interface Options = { basename?: string, extname?: string }

declare const gulpJimp: (cb: Callback, opts?: Options) => stream.Transform

See jimp #methods for the full documentation.

Note that basename option should only be used when gulp.src() takes in one single file.

Be careful with the Jimp.write() method.

License

MIT License © 2020 Exuanbo