2022-11-24 22:51:24 +01:00

18 lines
497 B
TypeScript

import { cypressProjectGenerator } from '@nrwl/cypress';
import { Tree } from '@nrwl/devkit';
import { NormalizedSchema } from '../schema';
export async function addCypress(host: Tree, options: NormalizedSchema) {
if (options.e2eTestRunner !== 'cypress') {
return () => {};
}
return await cypressProjectGenerator(host, {
...options,
name: options.e2eProjectName,
directory: options.directory,
project: options.projectName,
rootProject: options.rootProject,
});
}