nx/packages/schematics/migrations/legacy-migrations/20171213-update-tsconfig-spec-to-exclude-e2e.ts

19 lines
426 B
TypeScript

import { updateJsonFile } from '@nrwl/workspace';
export default {
description: 'Update tsconfig.spec.json to exclude e2e specs',
run: () => {
updateJsonFile('tsconfig.spec.json', json => {
if (!json.exclude) {
json.exclude = ['node_modules', 'tmp'];
}
json.exclude = [
...json.exclude,
'**/e2e/*.ts',
'**/*.e2e-spec.ts',
'**/*.po.ts'
];
});
}
};