当前位置: 首页>>代码示例>>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;未经允许,请勿转载。