function gulpRebound(options) {

  options || (options = {});

  // Creating a stream through which each file will pass
  return through.obj(function(file, enc, cb) {
    // return empty file
    if (file.isNull()) return cb(null, file);

    if (file.isStream()) {
      throw new PluginError(PLUGIN_NAME, "Gulp Rebound doesn't handle streams!");
    }

    // Compile
    try{
      file.contents = new Buffer(rebound(file.contents.toString(enc), {
        name: file.path,
        baseDest: options.baseUrl || ''
      }).src, enc);
      gutil.log(gutil.colors.green('File ' + file.relative + ' compiled'));
      file.path = file.path.replace('.html', '.js');
    } catch(err){
      gutil.log(gutil.colors.red('Error in ' + file.relative));
      gutil.log(err);
    }

    cb(null, file);

  });

}
function gulpRebound(options) {

  options || (options = {});

  
  return through.obj(function(file, enc, cb) {
    
    if (file.isNull()) return cb(null, file);

    if (file.isStream()) {
      throw new PluginError(PLUGIN_NAME, "Gulp Rebound doesn't handle streams!");
    }

    
    try{
      file.contents = new Buffer(rebound(file.contents.toString(enc), {
        name: file.path,
        baseDest: options.baseUrl || ''
      }).src, enc);
      gutil.log(gutil.colors.green('File ' + file.relative + ' compiled'));
      file.path = file.path.replace('.html', '.js');
    } catch(err){
      gutil.log(gutil.colors.red('Error in ' + file.relative));
      gutil.log(err);
    }

    cb(null, file);

  });

}
function gulpRebound ( options ) { options || ( options = { } ) ; // Creating a stream through which each file will pass return through . obj ( function ( file , enc , cb ) { // return empty file if ( file . isNull ( ) ) return cb ( null , file ) ; if ( file . isStream ( ) ) { throw new PluginError ( PLUGIN_NAME , "Gulp Rebound doesn't handle streams!" ) ; } // Compile try { file . contents = new Buffer ( rebound ( file . contents . toString ( enc ) , { name : file . path , baseDest : options . baseUrl || '' } ) . src , enc ) ; gutil . log ( gutil . colors . green ( 'File ' + file . relative + ' compiled' ) ) ; file . path = file . path . replace ( '.html' , '.js' ) ; } catch ( err ) { gutil . log ( gutil . colors . red ( 'Error in ' + file . relative ) ) ; gutil . log ( err ) ; } cb ( null , file ) ; } ) ; }
Plugin level function(dealing with files)
Plugin level function ( dealing with files )