diff --git a/typescript/.gitignore b/typescript/.gitignore index 96ed4dbb4..37af99141 100644 --- a/typescript/.gitignore +++ b/typescript/.gitignore @@ -1,5 +1,34 @@ -.LAST_BUILD -*.snk +# TypeScript compiled files *.js +!jest.config.js *.d.ts + +# TypeScript incremental build states +*.tsbuildinfo + +# Node.js dependency directory +node_modules/ + +# NPM debug logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# CDK asset staging directory +.cdk.staging +cdk.out + +# Legacy build artifacts +.LAST_BUILD +*.snk + +# Editor and IDE files +.idea/ +.vscode/ *.swp +*.swo +*~ + +# OS specific files +.DS_Store +Thumbs.db diff --git a/typescript/.npmignore b/typescript/.npmignore index 669f07f59..ef68fe30c 100644 --- a/typescript/.npmignore +++ b/typescript/.npmignore @@ -1,3 +1,32 @@ +# TypeScript source files +*.ts +!*.d.ts +# Test files +test/ +__tests__/ + +# CDK asset staging directory +.cdk.staging +cdk.out + +# Legacy build artifacts .LAST_BUILD -*.snk \ No newline at end of file +*.snk + +# Source control files +.git/ +.github/ +.gitignore + +# Configuration files +tsconfig.json +cdk.json +jest.config.js +.eslintrc.js +.prettierrc +.npmignore + +# Editor and IDE files +.idea/ +.vscode/ diff --git a/typescript/README.md b/typescript/README.md index 4395a4e14..afe4c0657 100644 --- a/typescript/README.md +++ b/typescript/README.md @@ -4,6 +4,25 @@ This section contains all the CDK code examples written in Typescript. For more information on using the CDK in Typescript, please see the [Developer Guide](https://docs.aws.amazon.com/cdk/latest/guide/work-with-cdk-typescript.html). +## Repository Configuration Files + +This directory contains the following configuration files: + +- `.gitignore`: Specifies which files and directories should be excluded from Git version control + - Excludes compiled JavaScript files (except jest.config.js) + - Excludes TypeScript declaration files (*.d.ts) + - Excludes node_modules and other build artifacts + - Excludes CDK staging and output directories + - Excludes editor/IDE specific files and OS-specific files + +- `.npmignore`: Specifies which files and directories should be excluded when publishing to npm + - Excludes TypeScript source files (but includes declaration files) + - Excludes test files and directories + - Excludes configuration files and build artifacts + - Excludes source control files + +These files are used as a reference for the individual example projects. Each example may have its own specific configuration files tailored to its needs. + ## Running Examples To run a Typescript example, execute the following: