How to use the consola.info function in consola

To help you get started, we’ve selected a few consola 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 nuxt / nuxt-services-experimental / modules / nuxt-redis / index.js View on Github external
consola.info(`Connecting to redis://${settings.host}:${settings.port}/${settings.db.db}...`)

  const _connect = () => {
    const client = redis.createClient(settings)
    client.get = promisify(client.get).bind(client)
    client.set = promisify(client.set).bind(client)
    client.getJSON = getJSON.bind(client)
    client.setJSON = setJSON.bind(client)
    return client
  }
  const db = _connect()
  // db.on('error', errorCallback)

  consola.info(`Connected to ${settings.host} database`)

  consola.info('backend', `$${backend}`)
  this.nuxt[`$${backend}`] = db
}
github mya-ake / nuxt-on-lambda / scripts / deploy / src / processors / buildApp.ts View on Github external
export const buildApp = async (buildCommands: string[]) => {
  for (let i = 0; i < buildCommands.length; ++i) {
    const command = buildCommands[i];
    const parsedCommand = command.split(/\s/);
    const commandName = parsedCommand.shift();
    if (typeof commandName !== 'string' || commandName.length === 0) {
      consola.info(`Skip build command: \`${command}\`, index: ${i}`);
      continue;
    }
    await spawn(commandName, parsedCommand);
  }
};
github credija / opa / server / index.js View on Github external
async function start() {
  const nuxt = new Nuxt(config);
  if (config.dev) {
    const builder = new Builder(nuxt);
    await builder.build();
  }

  app.use(nuxt.render);

  app.listen(port, host);
  consola.ready({
    message: `Opa is now running on the address: http://${host}:${port}`,
    badge: true
  });
  consola.info({
    message: `BaseURL: ${BASE_URL !== undefined ? BASE_URL : '/'}`,
    badge: true
  });
}
start();
github universal-vue / uvue / packages / @uvue / devtools / cli / utils.js View on Github external
process.on('SIGINT', () => {
    consola.info('Generating report...');
  });
github nuxt / nuxt.js / packages / vue-renderer / src / renderer.js View on Github external
detectModernBuild () {
    const { options, resources } = this.serverContext
    if ([false, 'client', 'server'].includes(options.modern)) {
      return
    }

    if (!resources.modernManifest) {
      options.modern = false
      return
    }

    options.modern = options.render.ssr ? 'server' : 'client'
    consola.info(`Modern bundles are detected. Modern mode (\`${options.modern}\`) is enabled now.`)
  }