old_contents: 'use strict'
  
  const CachingWriter = require('broccoli-caching-writer')
  const Minifier = require('./minifier')
  
  class BroccoliImageMin extends CachingWriter {
  
      constructor(inputNodes, options) {
          super(Array.isArray(inputNodes) ? inputNodes : [inputNodes])
  
          this.minifier = new Minifier(options)
      }
  
      build() {
          return Promise.all(this.inputPaths.map(((inputPath) => {
              return this.minifier.minify(inputPath, this.outputPath)
          })))
      }
  }
  
  module.exports = BroccoliImageMin
new_contents: 'use strict'
  
  const BroccoliPluginAdapter = require('broccoli-plugin-adapter')
  const Minifier = require('./minifier')
  
  class BroccoliImageMin extends BroccoliPluginAdapter {
  
      constructor(inputNodes, options) {
          super(inputNodes, options)
  
          this.minifier = new Minifier(options)
      }
  
      handleContent(path, content) {
          if (this.minifier.matches(path)) {
              return this.minifier.minifyBuffer(content)
          } else {
              return content
          }
      }
  }
  
  module.exports = BroccoliImageMin
subject: use broccoli plugin adapter