index.js
function (file, unused, cb) {
    if (file.isNull()) {
      // nothing to do
      return cb(null, file)
    } else if (file.isStream()) {
      // file.contents is a Stream.  We don't support streams
      this.emit('error', new PluginError(PLUGIN_NAME, 'Streams not supported!'))
    } else if (file.isBuffer()) {
      // lazy init the acss class
      if (!acss) {
        acss = new Atomizer()

        if (addRules) {
          acss.addRules(addRules)
        }
      }

      // generate the class names and push them into the global collector array
      var html = String(file.contents)
      var classes = acss.findClassNames(html)
      foundClasses = Array.prototype.concat(foundClasses, classes)

      // make a note of this file if it's the newer than we've seen before
      if (!latestMod || file.stat && file.stat.mtime > latestMod) {
        latestFile = file
        latestMod = file.stat && file.stat.mtime
      }

      // tell the engine we're done
      cb()
    }
  }
function (file, unused, cb) {
    if (file.isNull()) {
      // nothing to do
      return cb(null, file)
    } else if (file.isStream()) {
      // file.contents is a Stream.  We don't support streams
      this.emit('error', new PluginError(PLUGIN_NAME, 'Streams not supported!'))
    } else if (file.isBuffer()) {
      // lazy init the acss class
      if (!acss) {
        acss = new Atomizer()

        if (addRules) {
          acss.addRules(addRules)
        }
      }

      // generate the class names and push them into the global collector array
      var html = String(file.contents)
      var classes = acss.findClassNames(html)
      foundClasses = Array.prototype.concat(foundClasses, classes)

      // make a note of this file if it's the newer than we've seen before
      if (!latestMod || file.stat && file.stat.mtime > latestMod) {
        latestFile = file
        latestMod = file.stat && file.stat.mtime
      }

      // tell the engine we're done
      cb()
    }
  }
function ( file , unused , cb ) { if ( file . isNull ( ) ) { // nothing to do return cb ( null , file ) } else if ( file . isStream ( ) ) { // file.contents is a Stream.  We don't support streams this . emit ( 'error' , new PluginError ( PLUGIN_NAME , 'Streams not supported!' ) ) } else if ( file . isBuffer ( ) ) { // lazy init the acss class if ( ! acss ) { acss = new Atomizer ( ) if ( addRules ) { acss . addRules ( addRules ) } } // generate the class names and push them into the global collector array var html = String ( file . contents ) var classes = acss . findClassNames ( html ) foundClasses = Array . prototype . concat ( foundClasses , classes ) // make a note of this file if it's the newer than we've seen before if ( ! latestMod || file . stat && file . stat . mtime > latestMod ) { latestFile = file latestMod = file . stat && file . stat . mtime } // tell the engine we're done cb ( ) } }
create the file handler
create the file handler