How to use the ora.ora function in ora

To help you get started, we’ve selected a few ora 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 electron / electron-rebuild / test / rebuild.ts View on Github external
import * as fs from 'fs-extra';
import * as path from 'path';
import * as os from 'os';
import * as ora from 'ora';

import { spawnPromise } from 'spawn-rx';
import { expect } from 'chai';
import { rebuild } from '../src/rebuild';

ora.ora = ora;

describe('rebuilder', () => {
  const testModulePath = path.resolve(os.tmpdir(), 'electron-forge-rebuild-test');

  const resetTestModule = async () => {
    await fs.remove(testModulePath);
    await fs.mkdirs(testModulePath);
    await fs.writeFile(path.resolve(testModulePath, 'package.json'), await fs.readFile(path.resolve(__dirname, '../test/fixture/native-app1/package.json'), 'utf8'));
    await spawnPromise('npm', ['install'], {
      cwd: testModulePath,
      stdio: 'ignore',
    });
  };

  describe('core behavior', function() {
    this.timeout(2 * 60 * 1000);

ora

Elegant terminal spinner

MIT
Latest version published 4 months ago

Package Health Score

81 / 100
Full package analysis