scripts/deploy.js
async function deploy() {
  try {
    await browserifyDBCP();
    await uglify();
    const ipfsHash = await deployToIPFS(`${ deploymentFolder}/${ browserifyName}`);
    await pinToIPFS(ipfsHash);
    const ipnsHash = await deployToIpns(ipfsHash);
    deleteDeploymentFolder();

    console.log(`\nFinished deployment`);
    console.log(`IPFS: ${ ipfsHash }`);
    console.log(`IPNS: ${ ipnsHash }`);
  } catch (ex) {
    console.error(ex);
  }
}
async function deploy() {
  try {
    await browserifyDBCP();
    await uglify();
    const ipfsHash = await deployToIPFS(`${ deploymentFolder}/${ browserifyName}`);
    await pinToIPFS(ipfsHash);
    const ipnsHash = await deployToIpns(ipfsHash);
    deleteDeploymentFolder();

    console.log(`\nFinished deployment`);
    console.log(`IPFS: ${ ipfsHash }`);
    console.log(`IPNS: ${ ipnsHash }`);
  } catch (ex) {
    console.error(ex);
  }
}
async function deploy ( ) { try { await browserifyDBCP ( ) ; await uglify ( ) ; const ipfsHash = await deployToIPFS ( ` ${ deploymentFolder } ${ browserifyName } ` ) ; await pinToIPFS ( ipfsHash ) ; const ipnsHash = await deployToIpns ( ipfsHash ) ; deleteDeploymentFolder ( ) ; console . log ( ` \n ` ) ; console . log ( ` ${ ipfsHash } ` ) ; console . log ( ` ${ ipnsHash } ` ) ; } catch ( ex ) { console . error ( ex ) ; } }
Build the js files into one file using browserify, deploys the file to ipfs and binds the new hash to ipns
Build the js files into one file using browserify deploys the file to ipfs and binds the new hash to ipns