Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Elad Ben-Israel authored and Miradorn committed Mar 1, 2021
1 parent 907e763 commit b4077a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ new AwsCdkConstructLibrary(options: AwsCdkConstructLibraryOptions)

Name | Type | Description
-----|------|-------------
**cdkDependenciesAsDeps**🔹 | <code>boolean</code> | Wether to add `cdkDependencies` to `dependencies`.
**cdkDependenciesAsDeps**🔹 | <code>boolean</code> | Whether CDK dependencies are added as normal dependencies (and peer dependencies).
**version**🔹 | <code>string</code> | The target CDK version for this library.

### Methods
Expand Down
11 changes: 6 additions & 5 deletions src/awscdk-construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ export interface AwsCdkConstructLibraryOptions extends ConstructLibraryOptions {
readonly cdkDependencies?: string[];

/**
* If this is enabled (default), all modules declared in `cdkDependencies` will be also added as normal `dependencies` (as well as `peerDependencies`).
* If this is enabled (default), all modules declared in `cdkDependencies` will be also added as
* normal `dependencies` (as well as `peerDependencies`).
*
* This is to ensure that downstream consumers actually have your CDK dependencies installed
* when using npm < 7 or yarn,
where peer dependencies are not automatically installed.
* If this is disabled, `cdkDependencies` will be added to `devDependencies` to ensure they are present during development.
* when using npm < 7 or yarn, where peer dependencies are not automatically installed.
* If this is disabled, `cdkDependencies` will be added to `devDependencies` to ensure
* they are present during development.
*
* @default true
*/
Expand Down Expand Up @@ -125,7 +126,7 @@ export class AwsCdkConstructLibrary extends ConstructLibrary {
public readonly version: string;

/**
* Wether to add `cdkDependencies` to `dependencies`.
* Whether CDK dependencies are added as normal dependencies (and peer dependencies).
*/
public readonly cdkDependenciesAsDeps: boolean

Expand Down

0 comments on commit b4077a0

Please sign in to comment.