How to use the gluegun.print.error function in gluegun

To help you get started, we’ve selected a few gluegun 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 bjonamu / ignite-react-app / src / cli / cli.js View on Github external
// should we show the version number & jet?
  // const hasNoArguments = isEmpty(commandLine._)
  // const hasVersionOption = commandLine.version || commandLine.v
  // if (hasNoArguments && hasVersionOption) {
  //   await runtime.run({ rawCommand: 'version' })
  //   return
  // }

  // wtf mode shows problems with plugins, commands, and extensions
  if (commandLine.wtf) {
    printWtf(runtime);
    return;
  }

  if (commandLine.verbose && !commandLine.debug) {
    print.error('Use --debug instead of --verbose.');
    return;
  }

  // run the command
  let context;
  try {
    context = await runtime.run();
  } catch (e) {
    console.log(pe.render(e));
    throw e; // rethrow
  }

  if (
    commandLine.help ||
    commandLine.h ||
    isNil(context.plugin) ||
github infinitered / ignite / src / cli / cli.ts View on Github external
run: async function run(argv) {
    // create a runtime
    let runtime
    try {
      runtime = buildIgnite()
    } catch (e) {
      console.log(pe.render(e))
      throw e // rethrow
    }

    // parse the command line
    const commandLine = minimist(argv.slice(2))

    if (commandLine.verbose && !commandLine.debug) {
      print.error('Use --debug instead of --verbose.')
      return
    }

    // run the command
    let toolbox
    try {
      toolbox = await runtime.run()
    } catch (e) {
      console.log(pe.render(e))
      throw e // rethrow
    }

    if (toolbox.error) {
      print.debug(toolbox.error)
    }
github tomzaku / react-native-cba-starter-kit / src / cli / cli.js View on Github external
if (!nameProject) throw 'Please fill your name app. For ex: zkrn init myApp'
    print.info('FILE BIN ' + __dirname)
    print.info('DEFAULT FOLDER ' + process.cwd())
    print.info(`Creating new react-native called ${nameProject}... Will take 5 minutes`)
    await installReactNative(nameProject)
    print.info('Creating react-native successfully')
    print.info('Now install dependence package')
    await installPackageDependence(nameProject)
    print.info('Copying base component')
    await copyBaseToProject(nameProject)
     // Link package
    print.info('Linking package...')
    await linkingPackage(nameProject)
    print.info('Done!. Run IOS now')
  } catch(err) {
    print.error(err)
  }
}
github pixeloven / pixeloven / packages / pixeloven / cli / src / toolbox / exit.ts View on Github external
function exit(name: string, status: number, msg: string = "Success!") {
    if (status) {
        print.error(`${name} exited with status ${status}\n`);
        process.exit(status);
    } else {
        print.success(msg);
    }
    return status;
}
github tomzaku / react-native-cba-starter-kit / src / cli / cli.js View on Github external
async function help() {
  print.error('Try this: zkrn init ')
}
async function init(nameProject) {
github tomzaku / react-native-cba-starter-kit / src / cli / cli.js View on Github external
async function remove(nameProject) {
  if(!nameProject) {
    print.error('Try this zkrn remove ')
  }
  print.info(`Removing ${nameProject}... Will take 5 minutes`)
  if (nameProject) {
    const { stdout, stderr } = await exec(`rm -rf ${process.cwd()}/${nameProject}`);
    print.info('Remove successfully!')
  }

}
const helpModule = () => {
github pixeloven / pixeloven / packages / pixeloven / cli / src / toolbox / invalid-arg.ts View on Github external
function invalidArgument(message?: string) {
    print.error(`Invalid argument provided. ${message}`);
    print.info("Run --help for more details");
}
github pixeloven / pixeloven / packages / pixeloven-cli / src / extensions / pixeloven-helpers / print-invalid-argument.ts View on Github external
export default () => {
    print.error("Invalid argument provided");
    print.info("Run --help for more details");
};