code: function (options, callback) {
    var withAsar = path.join(options.src, 'resources/app.asar')
    var withoutAsar = path.join(options.src, 'resources/app/package.json')
  
    try {
      fs.accessSync(withAsar)
      options.logger('Reading package metadata from ' + withAsar)
      callback(null, JSON.parse(asar.extractFile(withAsar, 'package.json')))
      return
    } catch (err) {
    }
  
    try {
      options.logger('Reading package metadata from ' + withoutAsar)
      callback(null, fs.readJsonSync(withoutAsar))
    } catch (err) {
      callback(new Error('Error reading package metadata: ' + (err.message || err)))
    }
  }
docs: Read `package.json` either from `resources.app.asar` (if the app is packaged)
  or from `resources/app/package.json` (if it is not).