How to use liftoff - 2 common examples

To help you get started, we’ve selected a few liftoff 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 shipitjs / shipit / packages / shipit-cli / src / cli.js View on Github external
shipit.on('task_err', () => exit(1))
    shipit.on('task_not_found', () => exit(1))

    shipit.start(runTasks)
  }
}

function invoke(env) {
  asyncInvoke(env).catch(error => {
    setTimeout(() => {
      throw error
    })
  })
}

const cli = new Liftoff({
  name: 'shipit',
  extensions: interpret.jsVariants,
  v8flags,
})
cli.launch(
  {
    configPath: program.shipitfile,
    require: program.require,
  },
  invoke,
)
github Soluto / dynamico / client / cli / src / index.ts View on Github external
const logDir = `${tmpdir()}\dcm`;
const logFileName = `dcm-${new Date().toLocaleString().replace(' ', '_')}`;

program
  .version(version)
  .description(description)
  .logger(logger({ logDir, logFileName }) as any);

export interface DcmConfig {
  registry: string;
  middleware?: Function;
  modifyRollupConfig?: ExtendRollupConfig;
}

const Dcm = new Liftoff({
  name: 'dcm',
  configName: 'dcmconfig',
  extensions: jsVariants
});

export default (argv: string[]) =>
  Dcm.prepare({}, env =>
    Dcm.execute(env, () => {
      const config: DcmConfig = env.configPath ? require(env.configPath).default : undefined;

      registerActions(config);

      program.logger().info(`You can find the log file in ${logDir}/${logFileName}`);
      program.parse(argv);
    })
  );

liftoff

Launch your command line tool with ease.

MIT
Latest version published 1 month ago

Package Health Score

86 / 100
Full package analysis

Popular liftoff functions