@nx/angular
Version:
16 lines (15 loc) • 660 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.setGeneratorDefaults = setGeneratorDefaults;
const devkit_1 = require("@nx/devkit");
function setGeneratorDefaults(tree, options) {
const nxJson = (0, devkit_1.readNxJson)(tree);
nxJson.generators = nxJson.generators ?? {};
nxJson.generators['@nx/angular:library'] = {
linter: options.libraryOptions.linter,
unitTestRunner: options.libraryOptions.unitTestRunner,
strict: !options.libraryOptions.strict ? false : undefined,
...(nxJson.generators['@nx/angular:library'] || {}),
};
(0, devkit_1.updateNxJson)(tree, nxJson);
}