code: function collect (files, file, rebundle) {
    if (files.length) {
      file = realpath(file)
      Promise.all(files.filter(f => css(f.uri)).map(f => resolveReal(f, file)))
        .then(files => {
          files.forEach(f => {
            if (f.isSet) {
              cssObjExport[f.uri] = true
            }
          })
        })
        .catch(error => {
          console.error(error)
        })
  
      if (collectTimer[file]) { clearTimeout(collectTimer[file]) }
      collectTimer[file] = setTimeout(() => {
        preparedep(file)
        Promise.all(files.map(f => resolveReal(f, file)))
          .then(files => {
            files.forEach(f => {
              if (!deps[f.uri]) {
                deps[f.uri] = {}
              }
  
              deps[file][f.uri] = deps[f.uri]
              debouncebundle(100)
            })
          })
      }, 100)
    } else if (rebundle) {
      debouncebundle(200)
    }
  }
docs: collect requires/imports