How to use the std-env.minimalCLI function in std-env

To help you get started, we’ve selected a few std-env 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.js / packages / webpack / src / config / base.js View on Github external
plugins.push(...(buildOptions.plugins || []))

    plugins.push(new WarningIgnorePlugin(this.warningIgnoreFilter()))

    // Build progress indicator
    plugins.push(new WebpackBar({
      name: this.name,
      color: this.colors[this.name],
      reporters: [
        'basic',
        'fancy',
        'profile',
        'stats'
      ],
      basic: !buildOptions.quiet && env.minimalCLI,
      fancy: !buildOptions.quiet && !env.minimalCLI,
      profile: !buildOptions.quiet && buildOptions.profile,
      stats: !buildOptions.quiet && !this.dev && buildOptions.stats,
      reporter: {
        change: (_, { shortPath }) => {
          if (!this.isServer) {
            nuxt.callHook('bundler:change', shortPath)
          }
        },
        done: (buildContext) => {
          if (buildContext.hasErrors) {
            nuxt.callHook('bundler:error')
          }
        },
        allDone: () => {
          nuxt.callHook('bundler:done')
        },
github nuxt / nuxt.js / packages / cli / src / utils / banner.js View on Github external
export function showBanner (nuxt, showMemoryUsage = true) {
  if (env.test) {
    return
  }

  if (env.minimalCLI) {
    for (const listener of nuxt.server.listeners) {
      consola.info('Listening on: ' + listener.url)
    }
    return
  }

  const titleLines = []
  const messageLines = []

  // Name and version
  const { bannerColor } = nuxt.options.cli
  titleLines.push(`${chalk[bannerColor].bold('Nuxt.js')} ${nuxt.constructor.version}`)

  // Running mode
  titleLines.push(`Running in ${nuxt.options.dev ? chalk.bold.blue('development') : chalk.bold.green('production')} mode (${chalk.bold(nuxt.options.mode)})`)
github nuxt / nuxt.js / packages / webpack / src / config / base.js View on Github external
plugins.push(...(buildOptions.plugins || []))

    plugins.push(new WarningIgnorePlugin(this.warningIgnoreFilter()))

    // Build progress indicator
    plugins.push(new WebpackBar({
      name: this.name,
      color: this.colors[this.name],
      reporters: [
        'basic',
        'fancy',
        'profile',
        'stats'
      ],
      basic: !buildOptions.quiet && env.minimalCLI,
      fancy: !buildOptions.quiet && !env.minimalCLI,
      profile: !buildOptions.quiet && buildOptions.profile,
      stats: !buildOptions.quiet && !this.dev && buildOptions.stats,
      reporter: {
        change: (_, { shortPath }) => {
          if (!this.isServer) {
            nuxt.callHook('bundler:change', shortPath)
          }
        },
        done: (buildContext) => {
          if (buildContext.hasErrors) {
            nuxt.callHook('bundler:error')
          }
        },
        allDone: () => {
          nuxt.callHook('bundler:done')
github medfreeman / nuxt-netlify-cms-module / src / module.js View on Github external
}
          );

          emitNetlifyConfig(compilation);
          cb();
        });
      }
    });

    !this.options.dev &&
      webpackConfig.plugins.push(
        new WebpackBar({
          name: WEBPACK_NETLIFY_COMPILER_NAME,
          color: "red",
          reporters: ["basic", "fancy", "profile", "stats"],
          basic: !this.options.build.quiet && env.minimalCLI,
          fancy: !this.options.build.quiet && !env.minimalCLI,
          profile: !this.options.build.quiet && this.options.build.profile,
          stats:
            !this.options.build.quiet &&
            !this.options.dev &&
            this.options.build.stats,
          reporter: {
            change: (_, { shortPath }) => {
              this.nuxt.callHook("bundler:change", shortPath);
            },
            done: context => {
              if (context.hasErrors) {
                this.nuxt.callHook("bundler:error");
              }
            },
            allDone: () => {
github medfreeman / nuxt-netlify-cms-module / src / module.js View on Github external
);

          emitNetlifyConfig(compilation);
          cb();
        });
      }
    });

    !this.options.dev &&
      webpackConfig.plugins.push(
        new WebpackBar({
          name: WEBPACK_NETLIFY_COMPILER_NAME,
          color: "red",
          reporters: ["basic", "fancy", "profile", "stats"],
          basic: !this.options.build.quiet && env.minimalCLI,
          fancy: !this.options.build.quiet && !env.minimalCLI,
          profile: !this.options.build.quiet && this.options.build.profile,
          stats:
            !this.options.build.quiet &&
            !this.options.dev &&
            this.options.build.stats,
          reporter: {
            change: (_, { shortPath }) => {
              this.nuxt.callHook("bundler:change", shortPath);
            },
            done: context => {
              if (context.hasErrors) {
                this.nuxt.callHook("bundler:error");
              }
            },
            allDone: () => {
              this.nuxt.callHook("bundler:done");

std-env

Runtime agnostic JS utils

MIT
Latest version published 11 days ago

Package Health Score

85 / 100
Full package analysis

Similar packages