當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript fs.exists函數代碼示例

本文整理匯總了TypeScript中electron-builder-util/out/fs.exists函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript exists函數的具體用法?TypeScript exists怎麽用?TypeScript exists使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了exists函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: installOrRebuild

export async function installOrRebuild(config: Config, appDir: string, electronVersion: string, platform: string, arch: string, forceInstall: boolean = false) {
  const args = asArray(config.npmArgs)
  if (forceInstall || !(await exists(path.join(appDir, "node_modules")))) {
    await installDependencies(appDir, electronVersion, platform, arch, args, !config.npmSkipBuildFromSource)
  }
  else {
    await rebuild(appDir, electronVersion, platform, arch, args, !config.npmSkipBuildFromSource)
  }
}
開發者ID:mbrainiac,項目名稱:electron-builder,代碼行數:9,代碼來源:yarn.ts

示例2: installOrRebuild

export async function installOrRebuild(config: Config, appDir: string, options: RebuildOptions, forceInstall: boolean = false) {
  const effectiveOptions = {
    buildFromSource: config.buildDependenciesFromSource === true,
    additionalArgs: asArray(config.npmArgs), ...options
  }

  if (forceInstall || !(await exists(path.join(appDir, "node_modules")))) {
    await installDependencies(appDir, effectiveOptions)
  }
  else {
    await rebuild(appDir, effectiveOptions)
  }
}
開發者ID:yuya-oc,項目名稱:electron-builder,代碼行數:13,代碼來源:yarn.ts

示例3: exists

 const nativeDeps = await BluebirdPromise.filter(pathToDep.values(), it => it.extraneous ? false : exists(path.join(it.path, "binding.gyp")), {concurrency: 8})
開發者ID:mbrainiac,項目名稱:electron-builder,代碼行數:1,代碼來源:yarn.ts

示例4: exists

 const nativeDeps = await BluebirdPromise.filter(await options.productionDeps!.value, it => exists(path.join(it.path, "binding.gyp")), {concurrency: 8})
開發者ID:yuya-oc,項目名稱:electron-builder,代碼行數:1,代碼來源:yarn.ts

示例5: doesNotExist

 async doesNotExist() {
   if (await exists(this.actual)) {
     throw new Error(`Path ${this.actual} must not exist`)
   }
 }
開發者ID:djpereira,項目名稱:electron-builder,代碼行數:5,代碼來源:fileAssert.ts


注:本文中的electron-builder-util/out/fs.exists函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。