How to use the electron-installer-common.readMetadata function in electron-installer-common

To help you get started, we’ve selected a few electron-installer-common 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 electron-userland / electron-installer-debian / src / installer.js View on Github external
      (async () => (await common.readMetadata(this.userSupplied)) || {})(),
      fsize(this.userSupplied.src),
github electron-userland / electron-installer-snap / src / default_args.js View on Github external
module.exports = async function defaultArgsFromApp (packageDir) {
  const packageJSON = await readMetadata({ src: packageDir, logger: debug })
  return defaultArgsFromPackageJSON(packageJSON)
}
github electron-userland / electron-installer-windows / src / installer.js View on Github external
async generateDefaults () {
    const pkg = (await common.readMetadata(this.userSupplied)) || {}

    const authors = pkg.author ? [typeof pkg.author === 'string' ? parseAuthor(pkg.author).name : pkg.author.name] : undefined

    this.defaults = Object.assign(common.getDefaultsFromPackageJSON(pkg), {
      version: pkg.version || '0.0.0',

      copyright: pkg.copyright || (authors && `Copyright \u00A9 ${new Date().getFullYear()} ${authors.join(', ')}`),
      authors: authors,
      owners: authors,

      exe: pkg.name ? `${pkg.name}.exe` : 'electron.exe',
      icon: path.resolve(__dirname, '../resources/icon.ico'),
      animation: path.resolve(__dirname, '../resources/animation.gif'),

      iconUrl: undefined,
github electron-userland / electron-installer-redhat / src / installer.js View on Github external
      (async () => (await common.readMetadata(this.userSupplied)) || {})(),
      redhatDependencies.forElectron(electronVersion, this.userSupplied.logger)