How to use the @beemo/core function in @beemo/core

To help you get started, we’ve selected a few @beemo/core 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 beemojs / beemo / packages / cli / src / CLI.ts View on Github external
/* eslint-disable no-console, @typescript-eslint/no-misused-promises */

import path from 'path';
import chalk from 'chalk';
import yargs from 'yargs';
import Beemo, { StdioType } from '@beemo/core';
// @ts-ignore
import corePackage from '@beemo/core/package.json';
import parseSpecialArgv from './parseSpecialArgv';

// 0 node, 1 beemo, 2 command
const { main, parallel } = parseSpecialArgv(process.argv.slice(2));

// Initialize
const binName = path.basename(process.argv[1]).replace('.js', ''); // Windows has an ext
const beemo = new Beemo(main.slice(1), binName);
const app = yargs(main);
const manualURL = process.env.BEEMO_MANUAL_URL || 'https://milesj.gitbook.io/beemo';

// Bootstrap the module
beemo.bootstrapConfigModule();

// Register global options
beemo.bootstrapCLI(app);

// Add a command for each driver
beemo.getPlugins('driver').forEach(driver => {
  const { command, metadata } = driver;

  app.command(
    driver.name,
    metadata.description || beemo.msg('app:run', { title: metadata.title }),

@beemo/core

Manage all dev tool configurations in a single centralized repository.

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis