From f43b4f7da84dd791814adace01a31c56ea55efcc Mon Sep 17 00:00:00 2001 From: Eugene Cheung <81188333+echeung-amzn@users.noreply.github.com> Date: Fri, 25 Feb 2022 17:14:17 -0500 Subject: [PATCH] chore: exclude TS files from final tarball (#23) Partially addresses #18 Verified that tarball (`dist/js/cdk-monitoring-constructs@0.0.0.jsii.tgz`) doesn't include TS files anymore. --- .npmignore | 2 ++ .projenrc.js | 6 ++++++ package.json | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index 5178c81c..2c8ff295 100644 --- a/.npmignore +++ b/.npmignore @@ -20,3 +20,5 @@ dist tsconfig.tsbuildinfo /.eslintrc.json !.jsii +*.ts +!*.d.ts diff --git a/.projenrc.js b/.projenrc.js index bbf4ad79..4128eaa5 100644 --- a/.projenrc.js +++ b/.projenrc.js @@ -9,6 +9,7 @@ const project = new awscdk.AwsCdkConstructLibrary({ author: "CDK Monitoring Constructs Team", authorAddress: "monitoring-cdk-constructs@amazon.com", defaultReleaseBranch: "main", + stability: "experimental", cdkVersion: CDK_VERSION, cdkVersionPinning: true, @@ -91,4 +92,9 @@ project.eslint.addRules({ "prettier/prettier": "error", }); +// Don't need to include the TypeScript source files in the tarball; the transpiled JS files and +// typing files are sufficient. +project.addPackageIgnore("*.ts"); +project.addPackageIgnore("!*.d.ts"); + project.synth(); diff --git a/package.json b/package.json index 03456bad..121a683c 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ } }, "types": "lib/index.d.ts", - "stability": "stable", + "stability": "experimental", "jsii": { "outdir": "dist", "targets": {