nx-electron
Version:
Electron Plugin for Nx
31 lines • 1.68 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const devkit_1 = require("@nrwl/devkit");
function update(host) {
var _a, _b, _c, _d, _e;
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const projects = (0, devkit_1.getProjects)(host);
for (const [name, config] of projects.entries()) {
if (config.targets.build.executor !== 'nx-electron:build')
return;
let updated = false;
if (typeof ((_c = (_b = (_a = config.targets.build) === null || _a === void 0 ? void 0 : _a.configurations) === null || _b === void 0 ? void 0 : _b.production) === null || _c === void 0 ? void 0 : _c['showCircularDependencies']) !== 'undefined') {
delete config.targets.build.configurations.production['showCircularDependencies'];
updated = true;
}
if (typeof ((_e = (_d = config.targets.build) === null || _d === void 0 ? void 0 : _d.options) === null || _e === void 0 ? void 0 : _e['showCircularDependencies']) !==
'undefined') {
delete config.targets.build.options['showCircularDependencies'];
updated = true;
}
if (updated) {
(0, devkit_1.updateProjectConfiguration)(host, name, config);
devkit_1.logger.info(`nx-electron removed legacy build option from "${name}": showCircularDependencies`);
}
}
yield (0, devkit_1.formatFiles)(host);
});
}
exports.default = update;
//# sourceMappingURL=remove-deprecated-options.js.map