How to use the @ionic/utils-process.sleepForever function in @ionic/utils-process

To help you get started, we’ve selected a few @ionic/utils-process examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ionic-team / ionic-cli / packages / ionic / src / commands / cordova / run.ts View on Github external
const cordovalogws = createPrefixedWriteStream(this.env.log, weak(`[cordova]`));
    const buildOpts: IShellRunOptions = { stream: cordovalogws };
    // ignore very verbose compiler output on stdout unless --verbose
    buildOpts.stdio = options['verbose'] ? 'inherit' : ['pipe', 'ignore', 'pipe'];

    if (options['native-run']) {
      const [ platform ] = inputs;
      const packagePath = await getPackagePath(conf.getProjectInfo().name, platform, { emulator: !options['device'], release: !!options['release'] });
      const forwardedPorts = details ? runner.getUsedPorts(runnerOpts, details) : [];

      await this.runCordova(filterArgumentsForCordova({ ...metadata, name: 'build' }, options), buildOpts);
      await this.runNativeRun(createNativeRunArgs({ packagePath, platform, forwardedPorts }, options));
    } else {
      await this.runCordova(filterArgumentsForCordova(metadata, options), buildOpts);
      await sleepForever();
    }
  }
github ionic-team / ionic-cli / packages / ionic / src / commands / serve.ts View on Github external
if (!cordova) {
          await runCommand(runinfo, ['integrations', 'enable', 'cordova']);
        }
      }

      await runner.run(runnerOpts);
    } catch (e) {
      if (e instanceof RunnerException) {
        throw new FatalException(e.message);
      }

      throw e;
    }

    await sleepForever();
  }
}
github ionic-team / ionic-cli / packages / ionic / src / commands / capacitor / run.ts View on Github external
this.env.log.info(
      'Ready for use in your Native IDE!\n' +
      `To continue, run your project on a device or ${platform === 'ios' ? 'simulator' : 'emulator'} using ${platform === 'ios' ? 'Xcode' : 'Android Studio'}!`
    );

    this.env.log.nl();

    await this.runCapacitor(['open', platform]);

    if (options['livereload']) {
      this.env.log.nl();
      this.env.log.info(
        'Development server will continue running until manually stopped.\n' +
        chalk.yellow('Use Ctrl+C to quit this process')
      );
      await sleepForever();
    }
  }

@ionic/utils-process

Process utils for NodeJS

MIT
Latest version published 1 year ago

Package Health Score

68 / 100
Full package analysis

Similar packages