How to use the just-scripts-utils.prettyPrintMarkdown function in just-scripts-utils

To help you get started, we’ve selected a few just-scripts-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 microsoft / just / packages / just-scripts / src / tasks / addPackageTask.ts View on Github external
});

      // Remove some files that aren't relevant for an individual project within a monorepo
      fse.removeSync(path.join(packagePath, '.gitignore'));
      fse.removeSync(path.join(packagePath, '.gitattributes'));
      fse.removeSync(path.join(packagePath, '.vscode'));

      rushAddPackage(name, rootPath);
      logger.info('Running rush update');
      rushUpdate(rootPath);

      logger.info('All Set!');

      const readmeFile = path.join(packagePath, 'README.md');
      if (fse.existsSync(readmeFile)) {
        logger.info('\n' + prettyPrintMarkdown(fse.readFileSync(readmeFile).toString()));
      }
    }
  };
}
github microsoft / just / packages / create-just / src / commands / initCommand.ts View on Github external
You can build your project in production mode with these commands:

    cd ${paths.projectPath}
    ${pkg.getYarn() ? 'yarn' : 'npm run'} build

${existsSync(path.join(paths.projectPath, 'plopfile.js')) &&
  `
This repository contains code generators that can be triggered by:

    cd ${paths.projectPath}
    ${pkg.getYarn() ? 'yarn' : 'npm run'} gen

`}`;

  logger.info(prettyPrintMarkdown(nextStepsMd));
}
github microsoft / just / packages / just-scripts / src / tasks / addPackageTask.ts View on Github external
if (pkgJson && pkgJson.devDependencies && pkgJson.just && pkgJson.just.stack) {
        delete pkgJson.devDependencies[pkgJson.just.stack];
      }

      fse.writeFileSync(path.join(packagePath, 'package.json'), JSON.stringify(pkgJson, null, 2));

      rushAddPackage(name, rootPath);
      logger.info('Running rush update');
      rushUpdate(rootPath);

      logger.info('All Set!');

      const readmeFile = path.join(packagePath, 'README.md');
      if (fse.existsSync(readmeFile)) {
        logger.info('\n' + prettyPrintMarkdown(fse.readFileSync(readmeFile).toString()));
      }
    }
  };
}