@aws-c2a/web-app v0.7.3
AWS CDK Change Analyzer (C2A) - Web App
@aws-c2a/web-app is a package that generates a web app to help you visualize and
interact with the change report generated by @aws-c2a/engine;
Usage
We recommend using the aws-c2a CLI to run the
web app. However, if you wish to interact directly with the package itself check
out the integration section below.
Integration
To use the web app package in a production environment:
Install the
@aws-c2a/web-apppackageyarn add @aws-c2a/web-appImport package and obtain the path to the template file
const templatePath = require(resolve('@aws-c2a/web-app/fixtures/template.index.html')); const template = await fs.promises.readFile(templatePath, 'utf-8');Replace the placeholder values in the template file with stringified change report
const webapp = template.replace('"!!!CDK_CHANGE_ANALYSIS_REPORT"', report);
To use the web app package in a developer environment:
First install and build all packages.
git clone https://github.com/cdklabs/awscdk-change-analyzer.git cd awscdk-change-analyzer yarn install yarn build cd packages/@aws-c2a/web-appThen create the necessary data file (change report) for testing.
touch data.jsonNow you can start developing with
@aws-c2a/web-apprunning locally.yarn dev