Skip to content

Commit

Permalink
Setup default tsconfig.json on all monorepo package
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed Jan 20, 2023
1 parent 1f769c1 commit de478bf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/setup-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ paths.forEach(async (pkgPath) => {
if (isTS) {
pkg.scripts = pkg.scripts ?? {};
pkg.scripts.tsc = 'tsc';

const tsConfig = {
extends: path.relative(dir, path.join(__dirname, '../tsconfig.json')),
compilerOptions: {
outDir: './dist',
},
include: ['./src'],
};
fs.promises.writeFile(
path.join(dir, 'tsconfig.json'),
JSON.stringify(tsConfig, null, 2)
);
}

fs.promises.writeFile(pkgPath, JSON.stringify(pkg, null, 2));
Expand Down

0 comments on commit de478bf

Please sign in to comment.