A reusable AWS CDK construct library providing TypeScript constructs for infrastructure as code.
npm install layertwo-cdk-constructsimport { Hello } from 'layertwo-cdk-constructs';
const hello = new Hello();
console.log(hello.sayHello()); // Output: hello, world!This project uses Projen for project configuration and build management. All configuration is defined in .projenrc.ts.
- Node.js 18+
- Yarn package manager
# Install dependencies
yarn install
# Generate project files from .projenrc.ts
npx projen# Build the project (compile + test + package)
npm run build
# Compile TypeScript only
npm run compile
# Run tests with coverage
npm test
# Run tests in watch mode
npm run test:watch
# Run linter
npm run eslint
# Watch mode for development
npm run watch
# Generate distributable packages
npm run package
# Upgrade dependencies
npm run upgrade.
├── src/ # Source code for CDK constructs
│ └── index.ts # Main entry point, exports public API
├── test/ # Jest test files
├── lib/ # Compiled JavaScript output (generated)
├── dist/ # JSII package output (generated)
├── .projenrc.ts # Projen configuration (source of truth)
└── package.json # Generated by Projen
- Modify source code in
src/ - Add tests in
test/ - Run
npm run buildto compile and test - For project configuration changes, edit
.projenrc.tsand runnpx projen
Important: Do not manually edit files marked with ~~ Generated by projen. Instead, modify .projenrc.ts and regenerate.
- Language: TypeScript 5.9+
- Framework: AWS CDK 2.200.0
- Testing: Jest 30+ with ts-jest
- Linting: ESLint 9
- Publishing: JSII for multi-language package generation
Contributions are welcome! Please ensure all tests pass and code follows the project's linting rules before submitting.
Apache-2.0
Lucas Messenger (1335960+layertwo@users.noreply.github.com)