lib/square.js
function find(deleted, file) {
    var meta = bundle[file].meta
      , match = files.some(function some (file) {
          return file === meta.location || ~meta.location.indexOf(file)
            || (meta.compiler && ~meta.compiler.imported.join(',').indexOf(file));
        });

    if (!match) return;

    // If we check previous for deleted files, don't read content.
    if (!deleted) {
      self.hold(meta.location); // Temporary freeze of the event loop.
      self.package.bundle[file].meta.content = fs.readFileSync(meta.location, 'utf8');
    }

    // Add the file extension to the extensions list so we can create
    // a dedicated rebuild.
    extensions.push(meta.output);
    changes.push(file);
  }
function find(deleted, file) {
    var meta = bundle[file].meta
      , match = files.some(function some (file) {
          return file === meta.location || ~meta.location.indexOf(file)
            || (meta.compiler && ~meta.compiler.imported.join(',').indexOf(file));
        });

    if (!match) return;

    // If we check previous for deleted files, don't read content.
    if (!deleted) {
      self.hold(meta.location); // Temporary freeze of the event loop.
      self.package.bundle[file].meta.content = fs.readFileSync(meta.location, 'utf8');
    }

    // Add the file extension to the extensions list so we can create
    // a dedicated rebuild.
    extensions.push(meta.output);
    changes.push(file);
  }
function find ( deleted , file ) { var meta = bundle [ file ] . meta , match = files . some ( function some ( file ) { return file === meta . location || ~ meta . location . indexOf ( file ) || ( meta . compiler && ~ meta . compiler . imported . join ( ',' ) . indexOf ( file ) ) ; } ) ; if ( ! match ) return ; // If we check previous for deleted files, don't read content. if ( ! deleted ) { self . hold ( meta . location ) ; // Temporary freeze of the event loop. self . package . bundle [ file ] . meta . content = fs . readFileSync ( meta . location , 'utf8' ) ; } // Add the file extension to the extensions list so we can create // a dedicated rebuild. extensions . push ( meta . output ) ; changes . push ( file ) ; }
Find file in the bundle.

@param {Boolean} deleted are we checking for deleted files
@param {String} file
@api private
Find file in the bundle .