cdkx is a specialized command-line interface (CLI) tool designed to bundle assets for AWS Cloud Development Kit (CDK) applications. Primarily utilizing `esbuild` for its high performance, it streamlines the process of preparing CDK-managed code and assets for deployment. The current stable version is 1.0.12. This package aims to provide an efficient bundling solution for TypeScript-based AWS CDK projects, making it easier to manage dependencies and optimize deployment artifacts. Its key differentiator lies in its focused approach to integrating `esbuild` directly into the CDK development workflow, offering a simpler alternative for asset bundling compared to configuring `esbuild` manually or relying on broader build tools. While not an official AWS CDK tool, it integrates with `@aws-cdk/core` to provide a tailored bundling experience for CDK constructs.
npm install cdkxVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to use the `cdkx` CLI to bundle a TypeScript Lambda function, specifying common `esbuild` options and an output directory for CDK assets.
Before `npm publish`, update `package.json`: `"private": false`. After publishing, revert to `"private": true` if it's an internal package within a monorepo managed by `lerna`.
Consult `esbuild` documentation for advanced features. If `cdkx` doesn't provide a passthrough or specific option, consider using `esbuild` directly for those assets or contributing to `cdkx`.
Before publishing, set `"private": false` in `package.json`. Remember to revert it if `cdkx` is part of a monorepo that requires it to be private during local development.
Ensure `esbuild` is listed in your project's `dependencies` and run `npm install` or `yarn install`.