@cypress/schematic
Version:
Official Cypress schematic for the Angular CLI
18 lines • 740 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const schematics_1 = require("@angular-devkit/schematics");
const utils_1 = require("../../utils");
function default_1(options) {
return (tree) => {
if (!options.project) {
throw new schematics_1.SchematicsException(`Invalid project name: ${options.project}`);
}
const angularJsonValue = (0, utils_1.getAngularJsonValue)(tree);
const { projects } = angularJsonValue;
const project = projects[options.project];
const appPath = `${project.sourceRoot}`;
return (0, utils_1.getDirectoriesAndCreateSpecs)({ tree, appPath });
};
}
exports.default = default_1;
//# sourceMappingURL=index.js.map