-
Notifications
You must be signed in to change notification settings - Fork 245
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
feat(jsii): exclude files in tsconfig.json #1491
Conversation
This change lets package.json of a jsii package to specify additional 'exclude' paths. They are encoded into tsconfig.json. Motivation jsconfig is a common way to configure tools like eslint and jest. These files have the 'js' extension but should not be compiled into the package. This flag lets the jsii compiled packages to configure this.
Not sure what’s I am seeing here? Seems like we already have this feature under a different name, no? |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Are you referring to the property |
I’ll let @RomainMuller chime in on this. |
Well that was introduced in #343, and since the PR was mostly about something else it flew in. But I'm generally favorable of modeling all the TypeScript compilation tweaks as an object under the I am also wondering if we took a wrong turn in generating the |
@@ -142,6 +144,7 @@ export async function loadProjectInfo(projectRoot: string, { fixPeerDependencies | |||
&& (pkg.contributors as any[]).map((contrib, index) => _toPerson(contrib, `contributors[${index}]`, 'contributor')), | |||
|
|||
excludeTypescript: (pkg.jsii && pkg.jsii.excludeTypescript) || [], | |||
exclude: (pkg.jsii && pkg.jsii.exclude) || [], |
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.
Breaks surrounding style, and you might not want to fix them all up, so take it or leave it:
exclude: (pkg.jsii && pkg.jsii.exclude) || [], | |
exclude: pkg.jsii?.exclude ?? [], |
Commit Message
This change lets package.json of a jsii package to specify additional
'exclude' paths. They are encoded into tsconfig.json.
Motivation
jsconfig is a common way to configure tools like eslint and jest. These
files have the 'js' extension but should not be compiled into the
package. This flag lets the jsii compiled packages to configure this.
End Commit Message
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.