@gammarers/projen-projects
v0.3.1
Published
[](https://www.npmjs.com/package/@gammarers/projen-projects) [](https://www.npmjs.com/package/@gammar
Readme
@gammarers/projen-projects
Opinionated projen project types for AWS CDK construct libraries and TypeScript packages.
Features
ProjenCdkConstructLibrary— anAwsCdkConstructLibrarywrapper with shared defaultsProjenTypeScriptProject— aTypeScriptProjectwrapper with the same shared defaults- Requires only
nameandrepositoryto get started (cdkVersionis also required for CDK libraries) - Defaults
repositoryUrlfromrepositorywhen omitted (CDK libraries) - Shared author, Node (
>= 20), TypeScript (6.0.x), and jsii (6.0.x, CDK libraries) settings - GitHub App credentials for workflow authentication
- Weekly dependency upgrades with auto-approve / auto-merge labels
- Generates a consistent
.editorconfig
Installation
npm:
npm install @gammarers/projen-projectsyarn:
yarn add @gammarers/projen-projectsUsage
Create a .projenrc.ts that uses ProjenCdkConstructLibrary:
import { ProjenCdkConstructLibrary } from '@gammarers/projen-projects';
const project = new ProjenCdkConstructLibrary({
name: '@example/my-cdk-construct',
repository: 'https://github.com/example/my-cdk-construct.git',
cdkVersion: '2.170.0',
});
project.synth();Or use ProjenTypeScriptProject for a TypeScript package:
import { ProjenTypeScriptProject } from '@gammarers/projen-projects';
const project = new ProjenTypeScriptProject({
name: '@example/my-typescript-project',
repository: 'https://github.com/example/my-typescript-project.git',
});
project.synth();Then generate the project files:
npx projenOptions
ProjenCdkConstructLibrary accepts ProjenCdkConstructLibraryOptions, which extends
AwsCdkConstructLibraryOptions (most fields optional) while requiring the following:
| Option | Type | Required | Description |
| --- | --- | --- | --- |
| name | string | Yes | Package name |
| repository | string | Yes | Repository URL (also used as the default for repositoryUrl) |
| cdkVersion | string | Yes | AWS CDK version |
Optional highlights:
| Option | Description |
| --- | --- |
| repositoryUrl | Jsii repository URL; defaults to repository when omitted |
| Other AwsCdkConstructLibrary options | Passed through and can override the built-in defaults |
Built-in defaults include author yicr, npm as the package manager, releaseToNpm: false,
public npm access, workflow Node 24.x, and GitHub App-based projen credentials.
ProjenTypeScriptProject accepts ProjenTypeScriptProjectOptions, which extends
TypeScriptProjectOptions (most fields optional) while requiring the following:
| Option | Type | Required | Description |
| --- | --- | --- | --- |
| name | string | Yes | Package name |
| repository | string | Yes | Repository URL |
Other TypeScriptProject options are passed through and can override the built-in defaults.
The same author, Node, TypeScript, npm, and GitHub App defaults as ProjenCdkConstructLibrary
apply (jsiiVersion is not set because this type is not a jsii project).
Requirements
- Node.js
>= 20.0.0 - projen
License
This project is licensed under the Apache-2.0 License.
