// @ts-check

const shelljs = require("shelljs");
const path = require("path");

(() => {
    shelljs.exec("npm verison patch");
    shelljs.exec("rimraf dist");
    shelljs.exec(`mkdir -p dist${path.sep}ios dist${path.sep}android`);
    shelljs.exec("react-native bundle --dev false --entry-file ./index.js --bundle-output ./dist/ios/main.jsbundle     --assets-dest ./dist/ios/assets     --platform ios");
    shelljs.exec("react-native bundle --dev false --entry-file ./index.js --bundle-output ./dist/android/main.jsbundle --assets-dest ./dist/android/assets --platform android");
    shelljs.exec("npm publish --access public --registry https://registry.npmjs.org");
})();
