Skip to content

Conversation

ofrobots
Copy link
Contributor

@ofrobots ofrobots commented Apr 3, 2018

tsconfig.json doesn't need an exclude section when an include section
is present.

Fixes: #70

tsconfig.json doesn't need an exclude section when an include section
is present.

Fixes: google#70
@codecov-io
Copy link

Codecov Report

Merging #143 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32c412b...4290d77. Read the comment docs.

@@ -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']
Copy link
Member

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']
Copy link
Member

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...

Copy link
Contributor Author

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:

https://github.com/ofrobots/ts-style/blob/4290d772df259e886728770f3cb77fba8eb8a2db/src/init.ts#L199

We should refine this to better match the expected project layout.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants