INNER CODE UNIT · JavaScript

promises

peggyrayzis/react-native-create-bridge · src/index.js:63

      const promises = environment.map(env =>
        environmentMap[env](templateName, templateFolder)
      );

      promises.push(createJSEnvironment(templateName, templateFolder, jsPath));

      Promise.all(promises).then(() => {
        console.log(
          `${successIcon} Your bridge module was successfully created! 🎉`
        );
      });
    })
    .catch(e => {
      console.log(
        `${errorIcon} Oh no! 💩  Something went wrong with creating your bridge module.\nPlease report any errors here: https://github.com/peggyrayzis/react-native-create-bridge/issues\n\nError: ${e}`
      );
    });
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…