UNPKG

rush-archive-project-plugin

Version:
27 lines 928 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.loadRushConfiguration = void 0; var rush_sdk_1 = require("@rushstack/rush-sdk"); var cwd2rushConfiguration = {}; var loadRushConfiguration = function (cwd) { if (cwd === void 0) { cwd = process.cwd(); } var rushConfiguration = cwd2rushConfiguration[cwd]; if (!rushConfiguration) { try { rushConfiguration = rush_sdk_1.RushConfiguration.loadFromDefaultLocation({ startingFolder: cwd }); } catch (e) { // no-catch console.log(e); } if (!rushConfiguration) { throw new Error('Could not load rush configuration'); } cwd2rushConfiguration[cwd] = rushConfiguration; } return rushConfiguration; }; exports.loadRushConfiguration = loadRushConfiguration; //# sourceMappingURL=rushConfiguration.js.map