sizeLabel += rightPadding; } console.log( `  ${sizeLabel}  ${chalk.dim(asset.folder + path.sep) + chalk.cyan(asset.name)}` ); }); } Create the production build and print the deployment instructions.
967724
function build(/* previousSizeMap */) {
  console.log('Creating an optimized production build...');
  webpack(config).run((err) => {
    if (err) {
      console.error('Failed to create a production build. Reason:');
      console.error(err.message || err);
      process.exit(1);
    }

    console.log(chalk.green('Compiled successfully.'));
    console.log();

    // console.log('File sizes after gzip:');
    // console.log();
    // printFileSizes(stats, previousSizeMap);
    // console.log();

    // Copy static files to dist folder
    // eslint-disable-next-line no-use-before-define
    copyToDistFolder();

    const openCommand = process.platform === 'win32' ? 'start' : 'open';
    const homepagePath = require(paths.appPackageJson).homepage;
    const publicPath = config.output.publicPath;

    if (homepagePath && homepagePath.indexOf('.github.io/') !== -1) {
      // "homepage": "http://user.github.io/project"
      console.log(`The project was built assuming it is hosted at ${chalk.green(publicPath)}.`);
      console.log(`You can control this with the ${chalk.green('homepage')} field in your ${chalk.cyan('package.json')}.`);
      console.log();
      console.log(`The ${chalk.cyan('dist')} folder is ready to be deployed.`);
      console.log(`To publish it at ${chalk.green(homepagePath)}, run:`);
      console.log();
      console.log(`  ${chalk.cyan('git')} commit -am ${chalk.yellow('"Save local changes"')}`);
      console.log(`  ${chalk.cyan('git')} checkout -B gh-pages`);
      console.log(`  ${chalk.cyan('git')} add -f dist`);
      console.log(`  ${chalk.cyan('git')} commit -am ${chalk.yellow('"Rebuild website"')}`);
      console.log(`  ${chalk.cyan('git')} filter-branch -f --prune-empty --subdirectory-filter dist`);
      console.log(`  ${chalk.cyan('git')} push -f origin gh-pages`);
      console.log(`  ${chalk.cyan('git')} checkout -`);
      console.log();
    } else if (publicPath !== '/') {
      // "homepage": "http://mywebsite.com/project"
      console.log(`The project was built assuming it is hosted at ${chalk.green(publicPath)}.`);
      console.log(`You can control this with the ${chalk.green('homepage')} field in your ${chalk.cyan('package.json')}.`);
      console.log();
      console.log(`The ${chalk.cyan('dist')} folder is ready to be deployed.`);
      console.log();
    } else {
      // no homepage or "homepage": "http://mywebsite.com"
      console.log('The project was built assuming it is hosted at the server root.');
      if (homepagePath) {
        // "homepage": "http://mywebsite.com"
        console.log(`You can control this with the ${chalk.green('homepage')} field in your ${chalk.cyan('package.json')}.`);
        console.log();
      } else {
        // no homepage
        console.log(`To override this, specify the ${chalk.green('homepage')} in your ${chalk.cyan('package.json')}.`);
        console.log('For example, add this to build it for GitHub Pages:');
        console.log();
        console.log(`  ${chalk.green('"homepage"') + chalk.cyan(': ') + chalk.green('"http://myname.github.io/myapp"') + chalk.cyan(',')}`);
        console.log();
      }
      console.log(`The ${chalk.cyan('dist')} folder is ready to be deployed.`);
      console.log('You may also serve it locally with a static server:');
      console.log();
      console.log(`  ${chalk.cyan('npm')} install -g pushstate-server`);
      console.log(`  ${chalk.cyan('pushstate-server')} build`);
      console.log(`  ${chalk.cyan(openCommand)} http://localhost:9000`);
      console.log();
    }
  });
}
206105
function (cfg, ctxt) {
        this.$Widget.constructor.apply(this, arguments);
        this.__setSkinObj(this._skinnableClass);
        // Show the label either if it has fixed width (for alignment) or if there's something to show
        this.showLabel = this._cfg.labelWidth > -1 || !!this._cfg.label;
    }
733926
function printResult(result, isDeploy, isCompressed, prefix, fn) {
  const relpath = truncate(path.relative(process.cwd(), result.filepath));

  if ((result.type == 'js' || result.type == 'css') && isDeploy) {
    zlib.gzip(result.content, (err, buffer) => {
      if (err) return fn(err);

      const stat = fs.statSync(result.filepath);
      const bytes = stat.size;
      const over = bytes > recommendedFileSizeLimit;
      const overZipped = buffer.length > recommendedFileSizeLimit;

      print(chalk.green(`${chalk.green(prefix)} built and compressed ${strong(relpath)}`), 1);
      print(`[compressed size: ${chalk[over ? 'red' : 'green'](prettyBytes(bytes))}]`, 2 + prefix.length);
      print(`[gzipped size: ${chalk[overZipped ? 'red' : 'green'](prettyBytes(buffer.length))}]`, 2 + prefix.length);
      if (over || overZipped) {
        warn(
          `the output file exceeds the recommended ${strong(prettyBytes(recommendedFileSizeLimit))} size`,
          2 + prefix.length
        );
        print(
          'Consider splitting into smaller bundles to help improve browser startup execution time',
          2 + prefix.length
        );
      }
      fn();
    });
  } else {
    print(chalk.green(`${chalk.green(prefix)} built${isCompressed ? ' and compressed' : ''} ${strong(relpath)}`), 1);
    fn();
  }
}
1289267
function outputHelp() {
    console.log(
        '\nUsage: git-hooks [options]\n\n' +
        'A tool to manage project Git hooks\n\n' +
        'Options:\n\n' +
        Object.keys(options)
            .map(function (key) {
                return '  --' + key + '\t' + options[key] + '\n';
            })
            .join('')
    );
}
1314004
function getLabel (script) {
  let name = script.name
  if (script.isPre || script.isPost) {
    name = chalk.cyan(name)
  } else if (!script.isSub) {
    name = chalk.bold(name)
  }

  return name + chalk.dim(` — ${script.cmd}`)
}
25865
function ProgressBar(progress) {
  // Make it 50 characters length
  progress = Math.min(100, progress)
  var units = Math.round(progress / 2)
  return chalk.dim('[') + chalk.blue('=').repeat(units) + ' '.repeat(50 - units) + chalk.dim('] ') + chalk.yellow(progress + '%')
}
59338
function (out) {
            var skinObj = this._skinObj, cfg = this._cfg;
            out.write(['<span style="float:left;text-align:', cfg.labelAlign,
                    skinObj.labelMargins ? ';margin:' + skinObj.labelMargins : '',
                    skinObj.labelFontSize ? ';font-size:' + skinObj.labelFontSize + 'px' : '',
                    cfg.labelWidth > -1 ? ';width:' + cfg.labelWidth + 'px' : '', '">',
                    ariaUtilsString.escapeHTML(cfg.label), '</span>'].join(""));
        }
368998
function log(text) {
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'success';
  var debug$$1 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

  if (!debug$$1) {
    return;
  }

  var success = 'padding: 2px; background: #219621; color: #ffffff';
  var warning = 'padding: 2px; background: #f1e05a; color: #333333';
  var error = 'padding: 2px; background: #b9090b; color: #ffffff';
  var types = { error: error, success: success, warning: warning };

  console.log('%c [Storage Helper] ' + text + ' ', types[type]);
}
17010
function(event, args) {
      var size = args[0];
		// TODO: do not hardcode those sizes !!
      WireIt.sn(this.bodyEl, null, {width: (size[0]-14)+"px", height: (size[1]-( this.ddHandle ? 44 : 14) )+"px"});
   }
692985
function (label) {
              console.log(label, {
                constructors: constructors,
                constructor: key,
                params: args
              });
            }
1366591
function createConfig(target /*: Target */, dev /*: boolean */,
        minimize /*: boolean */) /*: Object */ {
    const cssLoaders /*: Array<Object> */ = [{loader: 'css-loader'}];
    if (minimize) {
        cssLoaders[0].options = {importLoaders: 1};
        cssLoaders.push({
            loader: 'postcss-loader',
            options: {plugins: [require('cssnano')()]},
        });
    }

    const lessOptions = {modifyVars: {
        version: `"${version}"`,
    }};

    // use only necessary fonts, overridable by environment variables
    let isCovered = false;
    for (const font of fonts) {
        const override = process.env[`USE_${font.toUpperCase()}`];
        const useFont = override === "true" || override !== "false" && !isCovered;
        lessOptions.modifyVars[`use-${font}`] = useFont;

        const support = caniuse.feature(caniuse.features[font]).stats;
        isCovered = isCovered || useFont && browserslist.every(browser => {
            const [name, version] = browser.split(' ');
            return !support[name] || support[name][version] === 'y';
        });
    }

    return {
        mode: dev ? 'development' : 'production',
        context: __dirname,
        entry: {
            [target.name]: target.entry,
        },
        output: {
            filename: minimize ? '[name].min.js' : '[name].js',
            library: target.library,
            libraryTarget: 'umd',
            libraryExport: 'default',
            // Enable output modules to be used in browser or Node.
            // See: https://github.com/webpack/webpack/issues/6522
            globalObject: "(typeof self !== 'undefined' ? self : this)",
            path: path.resolve(__dirname, 'dist'),
            publicPath: dev ? '/' : '',
        },
        module: {
            rules: [
                {
                    test: /\.js$/,
                    exclude: /node_modules/,
                    use: 'babel-loader',
                },
                {
                    test: /\.css$/,
                    use: [
                        dev ? 'style-loader' : MiniCssExtractPlugin.loader,
                        ...cssLoaders,
                    ],
                },
                {
                    test: /\.less$/,
                    use: [
                        dev ? 'style-loader' : MiniCssExtractPlugin.loader,
                        ...cssLoaders,
                        {
                            loader: 'less-loader',
                            options: lessOptions,
                        },
                    ],
                },
                {
                    test: /\.(ttf|woff|woff2)$/,
                    use: [{
                        loader: 'file-loader',
                        options: {
                            name: 'fonts/[name].[ext]',
                        },
                    }],
                },
            ],
        },
        externals: 'katex',
        plugins: [
            !dev && new MiniCssExtractPlugin({
                filename: minimize ? '[name].min.css' : '[name].css',
            }),
        ].filter(Boolean),
        devtool: dev && 'inline-source-map',
        optimization: {
            minimize,
            minimizer: [
                new TerserPlugin({
                    terserOptions: {
                        output: {
                            ascii_only: true,
                        },
                    },
                }),
            ],
        },
        performance: {
            hints: false,
        },
    };
}
359390
async function generate(options = {}) {
  options = Object.assign(DEFAULT_OPTIONS, options)

  // Log start
  let msg = `Generating font kit from ${ options.paths.length } SVG icons`.yellow
  log(options, msg)

  // Run validation over options
  await validateOptions(options)

  if (options.codepoints) {
    options.codepointsMap = await getCodepointsMap(options.codepoints)
  }

  // Run font generation
  const config = getGeneratorConfig(options)
  const generatorResult = await fontGenerator(config)

  // Clean up after generator
  await deleteUnspecifiedTypes(options)

  // If specified, generate JSON map
  if (options.json) {
    await generateJson(options, generatorResult)
  }

  // Log generated files
  logReport(options)
}
537757
function debugPrint(label, arr, size) {
    var msg = '\n' + label + ' = ';
    for (var i = 0; i < arr.length; i += 2) {
        if (size === 32) {
            msg += uint32ToHex(arr[i]).toUpperCase();
            msg += ' ';
            msg += uint32ToHex(arr[i + 1]).toUpperCase();
        }
        else if (size === 64) {
            msg += uint32ToHex(arr[i + 1]).toUpperCase();
            msg += uint32ToHex(arr[i]).toUpperCase();
        }
        else
            throw new Error('Invalid size ' + size);
        if (i % 6 === 4) {
            msg += '\n' + new Array(label.length + 4).join(' ');
        }
        else if (i < arr.length - 2) {
            msg += ' ';
        }
    }
}
508248
async function build(file) {
  const { code, map, assets } = await ncc(file, options);

  if (Object.keys(assets).length)
    console.error("New unexpected assets are being emitted for", file);

  const name = basename(file, ".js");
  await mkdirp(resolve(DIST_DIR, name));
  write(resolve(DIST_DIR, name, "index.js"), code);
  write(resolve(DIST_DIR, name, "index.map.js"), map);
}
425864
async function build( inputOpts, outputOpts ) {

  // create a bundle
  const bundle = await rollup.rollup( inputOpts );

  // generate code and a sourcemap
  const { code, map } = await bundle.generate( outputOpts );

  console.log( 'Writing file: ' + outputOpts.file );
  writeFile( outputOpts.file, code );

  console.log( 'Generated bundle: ', bundle.getTimings()[ '# GENERATE' ] );

}
22386
function buildServer() {
  console.log();
  console.log(`${chalk.cyan('SERVER-SIDE')}`);
  console.log('===========================================================');
  fs.emptyDirSync(paths.appServerBuild);
  console.log('Creating a server-side production build...');

  let compiler = webpack(serverlize(paths, config));
  return new Promise((resolve, reject) => {
    compiler.run((err, stats) => {
      if (err) {
        return reject(err);
      } 
      const messages = formatWebpackMessages(stats.toJson({}, true));
      if (messages.errors.length) {
        // Only keep the first error. Others are often indicative
        // of the same problem, but confuse the reader with noise.
        if (messages.errors.length > 1) {
          messages.errors.length = 1;
        }
        return reject(new Error(messages.errors.join('\n\n')));
      }
      if (
        process.env.CI &&
        (typeof process.env.CI !== 'string' ||
          process.env.CI.toLowerCase() !== 'false') &&
        messages.warnings.length
      ) {
        console.log(
          chalk.yellow(
            '\nTreating warnings as errors because process.env.CI = true.\n' +
              'Most CI servers set it automatically.\n'
          )
        );
        return reject(new Error(messages.warnings.join('\n\n')));
      }
      return resolve({
        stats,
        warnings: messages.warnings,
      });
    });
  }).then(
    ({ stats, warnings }) => {
      if (warnings.length) {
        console.log(chalk.yellow('Compiled with warnings.\n'));
        console.log(warnings.join('\n\n'));
        console.log(
          '\nSearch for the ' +
            chalk.underline(chalk.yellow('keywords')) +
            ' to learn more about each warning.'
        );
        console.log(
          'To ignore, add ' +
            chalk.cyan('// eslint-disable-next-line') +
            ' to the line before.\n'
        );
      } else {
        console.log(chalk.green('Compiled successfully.\n'));
      }
      console.log(`The ${chalk.cyan(path.relative(process.cwd(), paths.appServerBuild))} folder is ready.`);
      console.log(`You may run it in ${chalk.cyan('node')} environment`);
      console.log();
      console.log(`  ${chalk.cyan('node')} ${chalk.cyan(path.relative(process.cwd(), paths.appServerBuild))}`);
      console.log();
    },
    err => {
      console.log(chalk.red('Failed to compile.\n'));
      printBuildError(err);
      process.exit(1);
    }
  );
}
47728
function intro() {
  // @TODO: How best to pull in .scss color data export to reference branch colors below?
  const b = chalk.hex('#545DA6'); // indigo, light
  const y = chalk.hex('#ffcc4d'); // yellow, base

  const CLI_TITLE = chalk.bold.underline('Bolt-CLI');
  const CLI_DESCRIPTION = 'Welcome to the Bolt CLI ⚡️  Have fun!';
  const CLI_USAGE = 'Usage: `bolt <command> [options ...]`';
  const HELP_USAGE = 'Help: `bolt -h` or `bolt <command> --help`';

  // const HELP_HEADER_BACKUP = `
  //     /˜˜˜˜˜˜˜˜˜˜˜˜\
  //    / /˜˜˜˜/|˜˜˜˜\ \
  //   / /    / |     \ \
  //  / /    /  |____  \ \
  // / /    /       /   \ \
  // \ \   /____   /    / /
  //  \ \      |  /    / /
  //   \ \     | /    / /
  //    \ \____|/____/ /
  //     \____________/
  // `

  // ^ Colorized + partially filled in version of logo above
  const HELP_HEADER = `
    ${b('///////|\\\\\\\\\\\\')}
   ${b('///˜˜˜˜')}${y('/|')}${b('˜˜˜˜\\\\\\')}
  ${b('///    ')}${y('//|')}${b('     \\\\\\')}     ${CLI_TITLE}
 ${b('///    ')}${y('///|____')}${b('  \\\\\\')}
${b('///    ')}${y('/////////')}${b('   \\\\\\')}   ${CLI_DESCRIPTION}
${b('\\\\\\   ')}${y('/////////')}${b('    ///')}
 ${b('\\\\\\      ')}${y('|///')}${b('    ///')}    ${CLI_USAGE}
  ${b('\\\\\\     ')}${y('|//')}${b('    ///')}     ${HELP_USAGE}
   ${b('\\\\\\____')}${y('|/')}${b('____///')}
    ${b('\\\\\\\\\\\\|///////')}
`;

  info(HELP_HEADER);
}