one
Version:
One is a React framework for web, iOS, and Android apps.
29 lines (26 loc) • 1.37 kB
JavaScript
import { existsSync } from "fs";
import { join } from "path";
import { loadUserOneOptions } from "../vite/loadConfig.native.js";
async function run(args) {
var _ref, _process_env, _RCT_METRO_PORT;
var _options_config_config_server, _options_config_config, _options_config;
var root = process.cwd();
var options = await loadUserOneOptions("serve", true).catch(function() {
return null;
});
var port = (_ref = options === null || options === void 0 ? void 0 : (_options_config = options.config) === null || _options_config === void 0 ? void 0 : (_options_config_config = _options_config.config) === null || _options_config_config === void 0 ? void 0 : (_options_config_config_server = _options_config_config.server) === null || _options_config_config_server === void 0 ? void 0 : _options_config_config_server.port) !== null && _ref !== void 0 ? _ref : 8081;
(_RCT_METRO_PORT = (_process_env = process.env).RCT_METRO_PORT) !== null && _RCT_METRO_PORT !== void 0 ? _RCT_METRO_PORT : _process_env.RCT_METRO_PORT = String(port);
if (!existsSync(join(root, "ios"))) {
var { run: prebuildRun } = await import("./prebuild.native.js");
await prebuildRun({ platform: "ios" });
}
var { runIos } = await import("vxrn");
await runIos({
root,
port,
simulator: args.simulator,
udid: args.udid
});
}
export { run };
//# sourceMappingURL=runIos.native.js.map