-
Notifications
You must be signed in to change notification settings - Fork 209
fix: exclude section is not necessary #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tsconfig.json doesn't need an exclude section when an include section is present. Fixes: google#70
Codecov Report
@@ Coverage Diff @@
## master #143 +/- ##
=======================================
Coverage 96.66% 96.66%
=======================================
Files 10 10
Lines 330 330
Branches 19 19
=======================================
Hits 319 319
Misses 11 11 Continue to review full report at Codecov.
|
@@ -155,8 +155,7 @@ async function generateTsConfig(options: Options): Promise<void> { | |||
const tsconfig = formatJson({ | |||
extends: './node_modules/gts/tsconfig-google.json', | |||
compilerOptions: {rootDir: '.', outDir: 'build'}, | |||
include: ['src/*.ts', 'src/**/*.ts', 'test/*.ts', 'test/**/*.ts'], | |||
exclude: ['node_modules'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to exclude node_modules
in one of my projects sometime in the past, but I forgot why.
@@ -155,8 +155,7 @@ async function generateTsConfig(options: Options): Promise<void> { | |||
const tsconfig = formatJson({ | |||
extends: './node_modules/gts/tsconfig-google.json', | |||
compilerOptions: {rootDir: '.', outDir: 'build'}, | |||
include: ['src/*.ts', 'src/**/*.ts', 'test/*.ts', 'test/**/*.ts'], | |||
exclude: ['node_modules'] | |||
include: ['src/*.ts', 'src/**/*.ts', 'test/*.ts', 'test/**/*.ts'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note. We say main: index.js
when we say our source files are in these directories... well...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because we generate the package.json
using npm
defaults hence:
We should refine this to better match the expected project layout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tsconfig.json doesn't need an exclude section when an include section
is present.
Fixes: #70