lib/sign.js
function distAddon(opts, cb) {
  // sign our add-on
  const generatedXpi = 'addon.xpi';
  signAddon(generatedXpi, opts.apiKey, opts.apiSecret, function(err, signedXpiPath) {
    if (err) return cb(err);
    // remove our generated xpi since we now have a signed version
    removeGeneratedXpi();
    // move our signed xpi and rdf into the /dist dir
    // directory and exit
    checkExistsAndMv(signedXpiPath, 'signed-addon.xpi', function(err) {
      if (err) return cb(err);
      console.log('addon.xpi written to signed-addon.xpi');
      cb();
    });
  });
}
function distAddon(opts, cb) {
  // sign our add-on
  const generatedXpi = 'addon.xpi';
  signAddon(generatedXpi, opts.apiKey, opts.apiSecret, function(err, signedXpiPath) {
    if (err) return cb(err);
    // remove our generated xpi since we now have a signed version
    removeGeneratedXpi();
    // move our signed xpi and rdf into the /dist dir
    // directory and exit
    checkExistsAndMv(signedXpiPath, 'signed-addon.xpi', function(err) {
      if (err) return cb(err);
      console.log('addon.xpi written to signed-addon.xpi');
      cb();
    });
  });
}
function distAddon ( opts , cb ) { // sign our add-on const generatedXpi = 'addon.xpi' ; signAddon ( generatedXpi , opts . apiKey , opts . apiSecret , function ( err , signedXpiPath ) { if ( err ) return cb ( err ) ; // remove our generated xpi since we now have a signed version removeGeneratedXpi ( ) ; // move our signed xpi and rdf into the /dist dir // directory and exit checkExistsAndMv ( signedXpiPath , 'signed-addon.xpi' , function ( err ) { if ( err ) return cb ( err ) ; console . log ( 'addon.xpi written to signed-addon.xpi' ) ; cb ( ) ; } ) ; } ) ; }
if we need to sign and distribute our add-on, we want to use this method
if we need to sign and distribute our add - on we want to use this method