diff --git a/.changeset/cyan-papayas-swim.md b/.changeset/cyan-papayas-swim.md new file mode 100644 index 000000000..f81628452 --- /dev/null +++ b/.changeset/cyan-papayas-swim.md @@ -0,0 +1,5 @@ +--- +'skuba': patch +--- + +**configure, init**: Exclude `lib-` directories from compilation diff --git a/README.md b/README.md index 39622386e..6342f159a 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ By convention, this points to a `tsconfig.build.json` that excludes tests from y "compilerOptions": { "outDir": "lib" }, - "exclude": ["lib/**/*"] + "exclude": ["lib*/**/*"] } ``` diff --git a/src/cli/configure/analysis/__snapshots__/project.test.ts.snap b/src/cli/configure/analysis/__snapshots__/project.test.ts.snap index f1aeccba6..bb4302ff7 100644 --- a/src/cli/configure/analysis/__snapshots__/project.test.ts.snap +++ b/src/cli/configure/analysis/__snapshots__/project.test.ts.snap @@ -156,7 +156,7 @@ module.exports = { \\"src\\": [\\"src\\"] } }, - \\"exclude\\": [\\"lib/**/*\\"], + \\"exclude\\": [\\"lib*/**/*\\"], \\"extends\\": \\"skuba/config/tsconfig.json\\" } ", diff --git a/src/cli/configure/modules/tsconfig.test.ts b/src/cli/configure/modules/tsconfig.test.ts index 455719d1d..54edbd957 100644 --- a/src/cli/configure/modules/tsconfig.test.ts +++ b/src/cli/configure/modules/tsconfig.test.ts @@ -88,7 +88,7 @@ describe('tsconfigModule', () => { assertDefined(outputData); expect(outputData.compilerOptions!.outDir).toBe('lib'); expect(outputData.compilerOptions!.target).toBe('ES2020'); - expect(outputData.exclude).toContain('lib/**/*'); + expect(outputData.exclude).toContain('lib*/**/*'); expect(outputData.exclude).toContain('.idea'); expect(outputData.extends).toBe('skuba/config/tsconfig.json'); expect(outputData.include).toBeUndefined(); diff --git a/template/base/tsconfig.json b/template/base/tsconfig.json index 3a39294ed..d58717cb5 100644 --- a/template/base/tsconfig.json +++ b/template/base/tsconfig.json @@ -7,6 +7,6 @@ }, "target": "ES2019" }, - "exclude": ["lib/**/*"], + "exclude": ["lib*/**/*"], "extends": "skuba/config/tsconfig.json" } diff --git a/template/oss-npm-package/tsconfig.json b/template/oss-npm-package/tsconfig.json index b0787eacd..245427520 100644 --- a/template/oss-npm-package/tsconfig.json +++ b/template/oss-npm-package/tsconfig.json @@ -3,6 +3,6 @@ "outDir": "lib", "target": "ES2019" }, - "exclude": ["lib/**/*"], + "exclude": ["lib*/**/*"], "extends": "skuba/config/tsconfig.json" } diff --git a/template/private-npm-package/tsconfig.json b/template/private-npm-package/tsconfig.json index b0787eacd..245427520 100644 --- a/template/private-npm-package/tsconfig.json +++ b/template/private-npm-package/tsconfig.json @@ -3,6 +3,6 @@ "outDir": "lib", "target": "ES2019" }, - "exclude": ["lib/**/*"], + "exclude": ["lib*/**/*"], "extends": "skuba/config/tsconfig.json" }