Skip to content

Commit bef1e0f

Browse files
committed
Support component without suffix in e2e
1 parent dac4db9 commit bef1e0f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/prepare-e2e.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ const cwd = process.cwd();
77
const [, , name, version] = process.argv;
88

99
function updateComponent() {
10-
let filepath = path.join(cwd, `./${name}/src/app/app.component.ts`);
10+
let filepath =
11+
[
12+
path.join(cwd, `./${name}/src/app/app.component.ts`),
13+
path.join(cwd, `./${name}/src/app/app.ts`),
14+
].find(path => fs.existsSync(path));
15+
1116
const code =
1217
`import { Apollo } from 'apollo-angular';\n` +
1318
`import { versionInfo } from 'graphql';\n` +

0 commit comments

Comments
 (0)