How to use the just-scripts.logger.info function in just-scripts

To help you get started, we’ve selected a few just-scripts 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 OfficeDev / office-ui-fabric-react / scripts / tasks / webpack.js View on Github external
exports.webpackDevServer = async function() {
  const fp = require('find-free-port');
  const webpackConfigFilePath = argv().webpackConfig || 'webpack.serve.config.js';
  const configPath = path.resolve(process.cwd(), webpackConfigFilePath);
  const port = await fp(4322, 4400);

  if (fs.existsSync(configPath)) {
    const webpackDevServerPath = require.resolve('webpack-dev-server/bin/webpack-dev-server.js');
    const execSync = require('../exec-sync');
    const cmd = `node ${webpackDevServerPath} --config ${configPath} --port ${port} --open`;

    logger.info(`Caching enabled: ${argv().cached}`);
    logger.info('Running: ', cmd);

    process.env.cached = argv().cached;

    execSync(cmd);
  }
};
github OfficeDev / office-ui-fabric-react / scripts / tasks / webpack.js View on Github external
exports.webpackDevServer = async function() {
  const fp = require('find-free-port');
  const webpackConfigFilePath = argv().webpackConfig || 'webpack.serve.config.js';
  const configPath = path.resolve(process.cwd(), webpackConfigFilePath);
  const port = await fp(4322, 4400);

  if (fs.existsSync(configPath)) {
    const webpackDevServerPath = require.resolve('webpack-dev-server/bin/webpack-dev-server.js');
    const execSync = require('../exec-sync');
    const cmd = `node ${webpackDevServerPath} --config ${configPath} --port ${port} --open`;

    logger.info(`Caching enabled: ${argv().cached}`);
    logger.info('Running: ', cmd);

    process.env.cached = argv().cached;

    execSync(cmd);
  }
};