How to use the @microsoft/rush-lib/lib/start.start function in @microsoft/rush-lib

To help you get started, we’ve selected a few @microsoft/rush-lib 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 / rushstack / apps / rush / src / start.ts View on Github external
import RushWrapper from './RushWrapper';

const currentPackageJson: IPackageJson = JsonFile.load(path.join(__dirname, '..', 'package.json'));

// Load the configuration
const configuration: MinimalRushConfiguration | undefined = MinimalRushConfiguration.loadFromDefaultLocation();

if (configuration) {
  const versionManager: RushVersionManager = new RushVersionManager(
    configuration.homeFolder,
    currentPackageJson.version
  );
  const rushWrapper: RushWrapper = versionManager.ensureRushVersionInstalled(configuration.rushVersion);
  rushWrapper.invokeRush();
} else {
  start(currentPackageJson.version, false);
}