How to use the razzle-dev-utils/logger.start function in razzle-dev-utils

To help you get started, we’ve selected a few razzle-dev-utils 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 jaredpalmer / razzle / packages / razzle / scripts / start.js View on Github external
function main() {
  // Optimistically, we make the console look exactly like the output of our
  // FriendlyErrorsPlugin during compilation, so the user has immediate feedback.
  // clearConsole();
  logger.start('Compiling...');
  let razzle = {};

  // Check for razzle.config.js file
  if (fs.existsSync(paths.appRazzleConfig)) {
    try {
      razzle = require(paths.appRazzleConfig);
    } catch (e) {
      clearConsole();
      logger.error('Invalid razzle.config.js file.', e);
      process.exit(1);
    }
  }

  // Delete assets.json to always have a manifest up to date
  fs.removeSync(paths.appManifest);
github jaredpalmer / after.js / packages / after / scripts / start.js View on Github external
const logger = require('razzle-dev-utils/logger');
const chokidar = require('chokidar');
const { choosePort } = require('react-dev-utils/WebpackDevServerUtils');

process.noDeprecation = true; // turns off that loadQuery clutter.

if (process.argv.includes('--inspect-brk')) {
  process.env.INSPECT_BRK_ENABLED = true;
} else if (process.argv.includes('--inspect')) {
  process.env.INSPECT_ENABLED = true;
}

// Optimistically, we make the console look exactly like the output of our
// FriendlyErrorsPlugin during compilation, so the user has immediate feedback.
// clearConsole();
logger.start('Compiling...');
let after = {};

// Check for after.config.js file
if (fs.existsSync(paths.appAfterConfig)) {
  try {
    after = require(paths.appAfterConfig);
  } catch (e) {
    clearConsole();
    logger.error('Invalid after.config.js file.', e);
    process.exit(1);
  }
}

// Delete assets.json to always have a manifest up to date
fs.removeSync(paths.appManifest);
github Val-Zhang / webpack-demo / src / scripts / start.js View on Github external
function main() {
  logger.start('Compiling...');
  const clientConfig = webpackConfig;
  const serverConfig = Object.assign({},webpackConfig,{target:'node'});

  const clientCompiler = compile(clientConfig);
  const serverCompiler = compile(serverConfig);

  clientCompiler.plugin('done', () => {
    serverCompiler.watch(
      {
        quiet: true,
        stats: 'none',
      },
      /* eslint-disable no-unused-vars */
      stats => {}
    );
  });

razzle-dev-utils

Utilities and helpers for Razzle

MIT
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis

Similar packages