How to use the builder-util.hashFile function in builder-util

To help you get started, we’ve selected a few builder-util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / BotFramework-Emulator / packages / app / main / gulpfile.js View on Github external
function hashFileAsync(filename, algo = 'sha512', encoding = 'base64') {
  var builderUtil = require('builder-util');
  return builderUtil.hashFile(filename, algo, encoding);
}
github microsoft / BotFramework-Emulator / packages / app / main / gulpfile.js View on Github external
function hashFileAsync(filename, algo = 'sha512', encoding = 'base64') {
  var builderUtil = require('builder-util');
  return builderUtil.hashFile(filename, algo, encoding);
}
github electron-userland / electron-builder / packages / app-package-builder / src / blockMap.ts View on Github external
export async function createPackageFileInfo(file: string, blockMapSize: number): Promise {
  return {
    path: file,
    size: (await stat(file)).size,
    blockMapSize,
    sha512: await hashFile(file),
  }
}
github electron-userland / electron-builder / packages / electron-builder / src / targets / blockMap.ts View on Github external
export async function createPackageFileInfo(file: string): Promise {
  return {
    file,
    size: (await stat(file)).size,
    sha512: await hashFile(file),
  }
}
github microsoft / BotFramework-Emulator / build / scripts / utils.js View on Github external
function hashFileAsync(filename, algo = 'sha512', encoding = 'base64') {
  const builderUtil = require('builder-util');
  return builderUtil.hashFile(filename, algo, encoding);
}
github electron-userland / electron-builder / packages / app-package-builder / src / blockMap.ts View on Github external
async function createFileInfo(blockMapData: Buffer, file: string, fileSize: number): Promise {
  return {
    path: file,
    size: fileSize,
    blockMapSize: blockMapData.length,
    blockMapData,
    sha512: await hashFile(file),
  }
}