Skip to content

Commit

Permalink
fix(cli): examples now use tsconfig.json instead of tsconfig.build.json
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed Apr 22, 2020
1 parent 3674a99 commit f01b4e9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/cli/generators/example/index.js
Expand Up @@ -131,10 +131,11 @@ module.exports = class extends BaseGenerator {
const cwd = process.cwd();
const absOutDir = await downloadAndExtractExample(this.exampleName, cwd);
this.outDir = path.relative(cwd, absOutDir);
return fs.rename(
`${this.outDir}/tsconfig.build.json`,
`${this.outDir}/tsconfig.json`,
);
const tsconfig = path.join(absOutDir, 'tsconfig.json');
const tsBuildConfig = path.join(absOutDir, 'tsconfig.build.json');
const exists = await fs.exists(tsconfig);
if (exists) return;
return fs.rename(tsBuildConfig, tsconfig);
}

install() {
Expand Down

0 comments on commit f01b4e9

Please sign in to comment.