How to use the aws-cdk/package.json.version function in aws-cdk

To help you get started, we’ve selected a few aws-cdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / packages / aws-cdk-toolkit / lib / init.ts View on Github external
private expand(template: string, project: ProjectInfo) {
        const cdkVersion = require('aws-cdk/package.json').version;
        return template.replace(/%name%/g, project.name)
                       .replace(/%name\.camelCased%/g, camelCase(project.name))
                       .replace(/%name\.PascalCased%/g, camelCase(project.name, { pascalCase: true }))
                       .replace(/%cdk-version%/g, cdkVersion);
    }
}

aws-cdk

CDK Toolkit, the command line tool for CDK apps

Apache-2.0
Latest version published 11 hours ago

Package Health Score

95 / 100
Full package analysis