index.js
function create(opt_options) {
  function runInclude(file, encoding, callback) {
    if (file.isNull()) {
      return callback(null, file);
    }
    if (file.isStream()) {
      this.emit('error', new PluginError(PLUGIN_NAME,
          'Streams not supported!'));
    }
    if (file.isBuffer()) {
      addIncludesToFile(file, opt_options).then((file) => {
        return callback(null, file);   
      })
      .catch(() => {
        return callback(null, file); 
      });
    }
  }
  var rv = function() {
    return through.obj(runInclude);
  };
  return rv; 
}
function create(opt_options) {
  function runInclude(file, encoding, callback) {
    if (file.isNull()) {
      return callback(null, file);
    }
    if (file.isStream()) {
      this.emit('error', new PluginError(PLUGIN_NAME,
          'Streams not supported!'));
    }
    if (file.isBuffer()) {
      addIncludesToFile(file, opt_options).then((file) => {
        return callback(null, file);   
      })
      .catch(() => {
        return callback(null, file); 
      });
    }
  }
  var rv = function() {
    return through.obj(runInclude);
  };
  return rv; 
}
function create ( opt_options ) { function runInclude ( file , encoding , callback ) { if ( file . isNull ( ) ) { return callback ( null , file ) ; } if ( file . isStream ( ) ) { this . emit ( 'error' , new PluginError ( PLUGIN_NAME , 'Streams not supported!' ) ) ; } if ( file . isBuffer ( ) ) { addIncludesToFile ( file , opt_options ) . then ( ( file ) => { return callback ( null , file ) ; } ) . catch ( ( ) => { return callback ( null , file ) ; } ) ; } } var rv = function ( ) { return through . obj ( runInclude ) ; } ; return rv ; }
Imports the required AMP custom-element script tags into an AMP document.

@param {Object} opt_options Configurations options, currently:
placeholder: Overrides the default placeholder.
mode: Overrides the default mode (MODES.PLACEHOLDER);
@return {!Transform} The created stream.Transform object.
Imports the required AMP custom - element script tags into an AMP document .