API Reference
Constructs
MonorepoJavaProject
- Implements: INxProjectCore
This project type will bootstrap a NX based monorepo with support for polygot builds, build caching, dependency graph visualization and much more.
Initializers
import { MonorepoJavaProject } from '@aws/pdk/monorepo'
new MonorepoJavaProject(options: MonorepoJavaOptions)
Name | Type | Description |
---|---|---|
options |
MonorepoJavaOptions |
No description. |
options
Required
- Type: MonorepoJavaOptions
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Exclude these files from the bundled package. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Marks the provided file(s) as being generated. |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir . |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
addDependency |
Adds a runtime dependency. |
addPlugin |
Adds a build plugin to the pom. |
addTestDependency |
Adds a test dependency. |
addImplicitDependency |
Create an implicit dependency between two Projects. |
addJavaDependency |
Adds a dependency between two Java Projects in the monorepo. |
addNxRunManyTask |
Add project task that executes npx nx run-many ... style command. |
addPythonPoetryDependency |
Adds a dependency between two Python Projects in the monorepo. |
composeNxRunManyCommand |
Helper to format npx nx run-many ... style command. |
execNxRunManyCommand |
Helper to format npx nx run-many ... style command execution in package manager. |
toString
public toString(): string
Returns a string representation of this construct.
addExcludeFromCleanup
public addExcludeFromCleanup(globs: string): void
Exclude the matching files from pre-synth cleanup.
Can be used when, for example, some source files include the projen marker and we don't want them to be erased during synth.
globs
Required
- Type: string
The glob patterns to match.
addGitIgnore
public addGitIgnore(pattern: string): void
Adds a .gitignore pattern.
pattern
Required
- Type: string
The glob pattern to ignore.
addPackageIgnore
public addPackageIgnore(_pattern: string): void
Exclude these files from the bundled package.
Implemented by project types based on the
packaging mechanism. For example, NodeProject
delegates this to .npmignore
.
_pattern
Required
- Type: string
The glob pattern to exclude.
addTask
public addTask(name: string, props?: TaskOptions): Task
Adds a new task to this project.
This will fail if the project already has a task with this name.
name
Required
- Type: string
The task name to add.
props
Optional
- Type: projen.TaskOptions
Task properties.
~~addTip
~~
public addTip(message: string): void
Prints a "tip" message during synthesis.
message
Required
- Type: string
The message.
annotateGenerated
public annotateGenerated(glob: string): void
Marks the provided file(s) as being generated.
This is achieved using the github-linguist attributes. Generated files do not count against the repository statistics and language breakdown.
https://github.com/github/linguist/blob/master/docs/overrides.md
glob
Required
- Type: string
the glob pattern to match (could be a file path).
postSynthesize
public postSynthesize(): void
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public preSynthesize(): void
Called before all components are synthesized.
removeTask
public removeTask(name: string): Task
Removes a task from a project.
name
Required
- Type: string
The name of the task to remove.
runTaskCommand
public runTaskCommand(task: Task): string
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
task
Required
- Type: projen.Task
The task for which the command is required.
synth
public synth(): void
Synthesize all project files into outdir
.
- Call "this.preSynthesize()"
- Delete all generated files
- Synthesize all subprojects
- Synthesize all components of this project
- Call "postSynthesize()" for all components of this project
- Call "this.postSynthesize()"
tryFindFile
public tryFindFile(filePath: string): FileBase
Finds a file at the specified relative path within this project and all its subprojects.
filePath
Required
- Type: string
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile
~~
public tryFindJsonFile(filePath: string): JsonFile
Finds a json file by name.
filePath
Required
- Type: string
The file path.
tryFindObjectFile
public tryFindObjectFile(filePath: string): ObjectFile
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePath
Required
- Type: string
The file path.
tryRemoveFile
public tryRemoveFile(filePath: string): FileBase
Finds a file at the specified relative path within this project and removes it.
filePath
Required
- Type: string
The file path.
If this path is relative, it will be resolved from the root of this project.
addDependency
public addDependency(spec: string): void
Adds a runtime dependency.
spec
Required
- Type: string
Format <groupId>/<artifactId>@<semver>
.
addPlugin
public addPlugin(spec: string, options?: PluginOptions): Dependency
Adds a build plugin to the pom.
The plug in is also added as a BUILD dep to the project.
spec
Required
- Type: string
dependency spec (group/artifact@version
).
options
Optional
- Type: projen.java.PluginOptions
plugin options.
addTestDependency
public addTestDependency(spec: string): void
Adds a test dependency.
spec
Required
- Type: string
Format <groupId>/<artifactId>@<semver>
.
addImplicitDependency
public addImplicitDependency(dependent: Project, dependee: string | Project): void
Create an implicit dependency between two Projects.
This is typically used in polygot repos where a Typescript project wants a build dependency on a Python project as an example.
dependent
Required
- Type: projen.Project
dependee
Required
- Type: string | projen.Project
addJavaDependency
public addJavaDependency(dependent: JavaProject, dependee: JavaProject): void
Adds a dependency between two Java Projects in the monorepo.
dependent
Required
- Type: projen.java.JavaProject
dependee
Required
- Type: projen.java.JavaProject
addNxRunManyTask
public addNxRunManyTask(name: string, options: RunManyOptions): Task
Add project task that executes npx nx run-many ...
style command.
name
Required
- Type: string
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
addPythonPoetryDependency
public addPythonPoetryDependency(dependent: PythonProject, dependee: PythonProject): void
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependent
Required
- Type: projen.python.PythonProject
dependee
Required
- Type: projen.python.PythonProject
composeNxRunManyCommand
public composeNxRunManyCommand(options: RunManyOptions): string[]
Helper to format npx nx run-many ...
style command.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
execNxRunManyCommand
public execNxRunManyCommand(options: RunManyOptions): string
Helper to format npx nx run-many ...
style command execution in package manager.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import { MonorepoJavaProject } from '@aws/pdk/monorepo'
MonorepoJavaProject.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: any
Any object.
isProject
import { MonorepoJavaProject } from '@aws/pdk/monorepo'
MonorepoJavaProject.isProject(x: any)
Test whether the given construct is a project.
x
Required
- Type: any
of
import { MonorepoJavaProject } from '@aws/pdk/monorepo'
MonorepoJavaProject.of(construct: IConstruct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
buildTask |
projen.Task |
No description. |
commitGenerated |
boolean |
Whether to commit the managed files by default. |
compileTask |
projen.Task |
No description. |
components |
projen.Component[] |
Returns all the components within this project. |
deps |
projen.Dependencies |
Project dependencies. |
ejected |
boolean |
Whether or not the project is being ejected. |
files |
projen.FileBase[] |
All files in this project. |
gitattributes |
projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
projen.IgnoreFile |
.gitignore. |
logger |
projen.Logger |
Logging utilities. |
name |
string |
Project name. |
outdir |
string |
Absolute output directory of this project. |
packageTask |
projen.Task |
No description. |
postCompileTask |
projen.Task |
No description. |
preCompileTask |
projen.Task |
No description. |
projectBuild |
projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
string |
The command to use in order to run the projen CLI. |
root |
projen.Project |
The root project. |
subprojects |
projen.Project[] |
Returns all the subprojects within this project. |
tasks |
projen.Tasks |
Project tasks. |
testTask |
projen.Task |
No description. |
defaultTask |
projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
projen.InitProject |
The options used when this project is bootstrapped via projen new . |
parent |
projen.Project |
A parent project. |
projectType |
projen.ProjectType |
No description. |
autoApprove |
projen.github.AutoApprove |
Auto approve set up for this project. |
devContainer |
projen.vscode.DevContainer |
Access for .devcontainer.json (used for GitHub Codespaces). |
github |
projen.github.GitHub |
Access all github components. |
gitpod |
projen.Gitpod |
Access for Gitpod. |
vscode |
projen.vscode.VsCode |
Access all VSCode components. |
compile |
projen.java.MavenCompile |
Compile component. |
distdir |
string |
Maven artifact output directory. |
packaging |
projen.java.MavenPackaging |
Packaging component. |
pom |
projen.java.Pom |
API for managing pom.xml . |
junit |
projen.java.Junit |
JUnit component. |
projenrc |
projen.java.Projenrc |
Projenrc component. |
nx |
NxWorkspace |
Return the NxWorkspace instance. |
nxConfigurator |
NxConfigurator |
No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
buildTask
Required
public readonly buildTask: Task;
- Type: projen.Task
commitGenerated
Required
public readonly commitGenerated: boolean;
- Type: boolean
Whether to commit the managed files by default.
compileTask
Required
public readonly compileTask: Task;
- Type: projen.Task
components
Required
public readonly components: Component[];
- Type: projen.Component[]
Returns all the components within this project.
deps
Required
public readonly deps: Dependencies;
- Type: projen.Dependencies
Project dependencies.
ejected
Required
public readonly ejected: boolean;
- Type: boolean
Whether or not the project is being ejected.
files
Required
public readonly files: FileBase[];
- Type: projen.FileBase[]
All files in this project.
gitattributes
Required
public readonly gitattributes: GitAttributesFile;
- Type: projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public readonly gitignore: IgnoreFile;
- Type: projen.IgnoreFile
.gitignore.
logger
Required
public readonly logger: Logger;
- Type: projen.Logger
Logging utilities.
name
Required
public readonly name: string;
- Type: string
Project name.
outdir
Required
public readonly outdir: string;
- Type: string
Absolute output directory of this project.
packageTask
Required
public readonly packageTask: Task;
- Type: projen.Task
postCompileTask
Required
public readonly postCompileTask: Task;
- Type: projen.Task
preCompileTask
Required
public readonly preCompileTask: Task;
- Type: projen.Task
projectBuild
Required
public readonly projectBuild: ProjectBuild;
- Type: projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public readonly projenCommand: string;
- Type: string
The command to use in order to run the projen CLI.
root
Required
public readonly root: Project;
- Type: projen.Project
The root project.
subprojects
Required
public readonly subprojects: Project[];
- Type: projen.Project[]
Returns all the subprojects within this project.
tasks
Required
public readonly tasks: Tasks;
- Type: projen.Tasks
Project tasks.
testTask
Required
public readonly testTask: Task;
- Type: projen.Task
defaultTask
Optional
public readonly defaultTask: Task;
- Type: projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProject
Optional
public readonly initProject: InitProject;
- Type: projen.InitProject
The options used when this project is bootstrapped via projen new
.
It includes the original set of options passed to the CLI and also the JSII FQN of the project type.
parent
Optional
public readonly parent: Project;
- Type: projen.Project
A parent project.
If undefined, this is the root project.
projectType
Required
public readonly projectType: ProjectType;
- Type: projen.ProjectType
autoApprove
Optional
public readonly autoApprove: AutoApprove;
- Type: projen.github.AutoApprove
Auto approve set up for this project.
devContainer
Optional
public readonly devContainer: DevContainer;
- Type: projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be undefined
if devContainer boolean is false
github
Optional
public readonly github: GitHub;
- Type: projen.github.GitHub
Access all github components.
This will be undefined
for subprojects.
gitpod
Optional
public readonly gitpod: Gitpod;
- Type: projen.Gitpod
Access for Gitpod.
This will be undefined
if gitpod boolean is false
vscode
Optional
public readonly vscode: VsCode;
- Type: projen.vscode.VsCode
Access all VSCode components.
This will be undefined
for subprojects.
compile
Required
public readonly compile: MavenCompile;
- Type: projen.java.MavenCompile
Compile component.
distdir
Required
public readonly distdir: string;
- Type: string
Maven artifact output directory.
packaging
Required
public readonly packaging: MavenPackaging;
- Type: projen.java.MavenPackaging
Packaging component.
pom
Required
public readonly pom: Pom;
- Type: projen.java.Pom
API for managing pom.xml
.
junit
Optional
public readonly junit: Junit;
- Type: projen.java.Junit
JUnit component.
projenrc
Optional
public readonly projenrc: Projenrc;
- Type: projen.java.Projenrc
Projenrc component.
nx
Required
public readonly nx: NxWorkspace;
- Type: NxWorkspace
Return the NxWorkspace instance.
This should be implemented using a getter.
nxConfigurator
Required
public readonly nxConfigurator: NxConfigurator;
- Type: NxConfigurator
Constants
Name | Type | Description |
---|---|---|
DEFAULT_TASK |
string |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASK
Required
public readonly DEFAULT_TASK: string;
- Type: string
The name of the default task (the task executed when projen
is run without arguments).
Normally this task should synthesize the project files.
MonorepoPythonProject
- Implements: INxProjectCore
This project type will bootstrap a NX based monorepo with support for polygot builds, build caching, dependency graph visualization and much more.
Initializers
import { MonorepoPythonProject } from '@aws/pdk/monorepo'
new MonorepoPythonProject(options: MonorepoPythonProjectOptions)
Name | Type | Description |
---|---|---|
options |
MonorepoPythonProjectOptions |
No description. |
options
Required
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Exclude these files from the bundled package. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Marks the provided file(s) as being generated. |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir . |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
addDependency |
Adds a runtime dependency. |
addDevDependency |
Adds a dev dependency. |
addImplicitDependency |
Create an implicit dependency between two Projects. |
addJavaDependency |
Adds a dependency between two Java Projects in the monorepo. |
addNxRunManyTask |
Add project task that executes npx nx run-many ... style command. |
addPythonPoetryDependency |
Adds a dependency between two Python Projects in the monorepo. |
composeNxRunManyCommand |
Helper to format npx nx run-many ... style command. |
execNxRunManyCommand |
Helper to format npx nx run-many ... style command execution in package manager. |
toString
public toString(): string
Returns a string representation of this construct.
addExcludeFromCleanup
public addExcludeFromCleanup(globs: string): void
Exclude the matching files from pre-synth cleanup.
Can be used when, for example, some source files include the projen marker and we don't want them to be erased during synth.
globs
Required
- Type: string
The glob patterns to match.
addGitIgnore
public addGitIgnore(pattern: string): void
Adds a .gitignore pattern.
pattern
Required
- Type: string
The glob pattern to ignore.
addPackageIgnore
public addPackageIgnore(_pattern: string): void
Exclude these files from the bundled package.
Implemented by project types based on the
packaging mechanism. For example, NodeProject
delegates this to .npmignore
.
_pattern
Required
- Type: string
The glob pattern to exclude.
addTask
public addTask(name: string, props?: TaskOptions): Task
Adds a new task to this project.
This will fail if the project already has a task with this name.
name
Required
- Type: string
The task name to add.
props
Optional
- Type: projen.TaskOptions
Task properties.
~~addTip
~~
public addTip(message: string): void
Prints a "tip" message during synthesis.
message
Required
- Type: string
The message.
annotateGenerated
public annotateGenerated(glob: string): void
Marks the provided file(s) as being generated.
This is achieved using the github-linguist attributes. Generated files do not count against the repository statistics and language breakdown.
https://github.com/github/linguist/blob/master/docs/overrides.md
glob
Required
- Type: string
the glob pattern to match (could be a file path).
postSynthesize
public postSynthesize(): void
Called after all components are synthesized.
Order is not guaranteed. NOTE: Be sure to ensure the VIRTUAL_ENV is unset during postSynthesize as the individual poetry envs will only be created if a existing VIRTUAL_ENV cannot be found.
preSynthesize
public preSynthesize(): void
Called before all components are synthesized.
removeTask
public removeTask(name: string): Task
Removes a task from a project.
name
Required
- Type: string
The name of the task to remove.
runTaskCommand
public runTaskCommand(task: Task): string
Returns the shell command to execute in order to run a task.
By default, this is npx projen@<version> <task>
task
Required
- Type: projen.Task
The task for which the command is required.
synth
public synth(): void
Synthesize all project files into outdir
.
- Call "this.preSynthesize()"
- Delete all generated files
- Synthesize all subprojects
- Synthesize all components of this project
- Call "postSynthesize()" for all components of this project
- Call "this.postSynthesize()"
tryFindFile
public tryFindFile(filePath: string): FileBase
Finds a file at the specified relative path within this project and all its subprojects.
filePath
Required
- Type: string
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile
~~
public tryFindJsonFile(filePath: string): JsonFile
Finds a json file by name.
filePath
Required
- Type: string
The file path.
tryFindObjectFile
public tryFindObjectFile(filePath: string): ObjectFile
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePath
Required
- Type: string
The file path.
tryRemoveFile
public tryRemoveFile(filePath: string): FileBase
Finds a file at the specified relative path within this project and removes it.
filePath
Required
- Type: string
The file path.
If this path is relative, it will be resolved from the root of this project.
addDependency
public addDependency(spec: string): void
Adds a runtime dependency.
spec
Required
- Type: string
Format <module>@<semver>
.
addDevDependency
public addDevDependency(spec: string): void
Adds a dev dependency.
spec
Required
- Type: string
Format <module>@<semver>
.
addImplicitDependency
public addImplicitDependency(dependent: Project, dependee: string | Project): void
Create an implicit dependency between two Projects.
This is typically used in polygot repos where a Typescript project wants a build dependency on a Python project as an example.
dependent
Required
- Type: projen.Project
dependee
Required
- Type: string | projen.Project
addJavaDependency
public addJavaDependency(dependent: JavaProject, dependee: JavaProject): void
Adds a dependency between two Java Projects in the monorepo.
dependent
Required
- Type: projen.java.JavaProject
dependee
Required
- Type: projen.java.JavaProject
addNxRunManyTask
public addNxRunManyTask(name: string, options: RunManyOptions): Task
Add project task that executes npx nx run-many ...
style command.
name
Required
- Type: string
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
addPythonPoetryDependency
public addPythonPoetryDependency(dependent: PythonProject, dependee: PythonProject): void
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependent
Required
- Type: projen.python.PythonProject
dependee
Required
- Type: projen.python.PythonProject
composeNxRunManyCommand
public composeNxRunManyCommand(options: RunManyOptions): string[]
Helper to format npx nx run-many ...
style command.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
execNxRunManyCommand
public execNxRunManyCommand(options: RunManyOptions): string
Helper to format npx nx run-many ...
style command execution in package manager.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import { MonorepoPythonProject } from '@aws/pdk/monorepo'
MonorepoPythonProject.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: any
Any object.
isProject
import { MonorepoPythonProject } from '@aws/pdk/monorepo'
MonorepoPythonProject.isProject(x: any)
Test whether the given construct is a project.
x
Required
- Type: any
of
import { MonorepoPythonProject } from '@aws/pdk/monorepo'
MonorepoPythonProject.of(construct: IConstruct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
buildTask |
projen.Task |
No description. |
commitGenerated |
boolean |
Whether to commit the managed files by default. |
compileTask |
projen.Task |
No description. |
components |
projen.Component[] |
Returns all the components within this project. |
deps |
projen.Dependencies |
Project dependencies. |
ejected |
boolean |
Whether or not the project is being ejected. |
files |
projen.FileBase[] |
All files in this project. |
gitattributes |
projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
projen.IgnoreFile |
.gitignore. |
logger |
projen.Logger |
Logging utilities. |
name |
string |
Project name. |
outdir |
string |
Absolute output directory of this project. |
packageTask |
projen.Task |
No description. |
postCompileTask |
projen.Task |
No description. |
preCompileTask |
projen.Task |
No description. |
projectBuild |
projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
string |
The command to use in order to run the projen CLI. |
root |
projen.Project |
The root project. |
subprojects |
projen.Project[] |
Returns all the subprojects within this project. |
tasks |
projen.Tasks |
Project tasks. |
testTask |
projen.Task |
No description. |
defaultTask |
projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
projen.InitProject |
The options used when this project is bootstrapped via projen new . |
parent |
projen.Project |
A parent project. |
projectType |
projen.ProjectType |
No description. |
autoApprove |
projen.github.AutoApprove |
Auto approve set up for this project. |
devContainer |
projen.vscode.DevContainer |
Access for .devcontainer.json (used for GitHub Codespaces). |
github |
projen.github.GitHub |
Access all github components. |
gitpod |
projen.Gitpod |
Access for Gitpod. |
vscode |
projen.vscode.VsCode |
Access all VSCode components. |
depsManager |
projen.python.IPythonDeps |
API for managing dependencies. |
envManager |
projen.python.IPythonEnv |
API for mangaging the Python runtime environment. |
moduleName |
string |
Python module name (the project name, with any hyphens or periods replaced with underscores). |
version |
string |
Version of the package for distribution (should follow semver). |
packagingManager |
projen.python.IPythonPackaging |
API for managing packaging the project as a library. |
pytest |
projen.python.Pytest |
Pytest component. |
nx |
NxWorkspace |
Return the NxWorkspace instance. |
nxConfigurator |
NxConfigurator |
No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
buildTask
Required
public readonly buildTask: Task;
- Type: projen.Task
commitGenerated
Required
public readonly commitGenerated: boolean;
- Type: boolean
Whether to commit the managed files by default.
compileTask
Required
public readonly compileTask: Task;
- Type: projen.Task
components
Required
public readonly components: Component[];
- Type: projen.Component[]
Returns all the components within this project.
deps
Required
public readonly deps: Dependencies;
- Type: projen.Dependencies
Project dependencies.
ejected
Required
public readonly ejected: boolean;
- Type: boolean
Whether or not the project is being ejected.
files
Required
public readonly files: FileBase[];
- Type: projen.FileBase[]
All files in this project.
gitattributes
Required
public readonly gitattributes: GitAttributesFile;
- Type: projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public readonly gitignore: IgnoreFile;
- Type: projen.IgnoreFile
.gitignore.
logger
Required
public readonly logger: Logger;
- Type: projen.Logger
Logging utilities.
name
Required
public readonly name: string;
- Type: string
Project name.
outdir
Required
public readonly outdir: string;
- Type: string
Absolute output directory of this project.
packageTask
Required
public readonly packageTask: Task;
- Type: projen.Task
postCompileTask
Required
public readonly postCompileTask: Task;
- Type: projen.Task
preCompileTask
Required
public readonly preCompileTask: Task;
- Type: projen.Task
projectBuild
Required
public readonly projectBuild: ProjectBuild;
- Type: projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public readonly projenCommand: string;
- Type: string
The command to use in order to run the projen CLI.
root
Required
public readonly root: Project;
- Type: projen.Project
The root project.
subprojects
Required
public readonly subprojects: Project[];
- Type: projen.Project[]
Returns all the subprojects within this project.
tasks
Required
public readonly tasks: Tasks;
- Type: projen.Tasks
Project tasks.
testTask
Required
public readonly testTask: Task;
- Type: projen.Task
defaultTask
Optional
public readonly defaultTask: Task;
- Type: projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProject
Optional
public readonly initProject: InitProject;
- Type: projen.InitProject
The options used when this project is bootstrapped via projen new
.
It includes the original set of options passed to the CLI and also the JSII FQN of the project type.
parent
Optional
public readonly parent: Project;
- Type: projen.Project
A parent project.
If undefined, this is the root project.
projectType
Required
public readonly projectType: ProjectType;
- Type: projen.ProjectType
autoApprove
Optional
public readonly autoApprove: AutoApprove;
- Type: projen.github.AutoApprove
Auto approve set up for this project.
devContainer
Optional
public readonly devContainer: DevContainer;
- Type: projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be undefined
if devContainer boolean is false
github
Optional
public readonly github: GitHub;
- Type: projen.github.GitHub
Access all github components.
This will be undefined
for subprojects.
gitpod
Optional
public readonly gitpod: Gitpod;
- Type: projen.Gitpod
Access for Gitpod.
This will be undefined
if gitpod boolean is false
vscode
Optional
public readonly vscode: VsCode;
- Type: projen.vscode.VsCode
Access all VSCode components.
This will be undefined
for subprojects.
depsManager
Required
public readonly depsManager: IPythonDeps;
- Type: projen.python.IPythonDeps
API for managing dependencies.
envManager
Required
public readonly envManager: IPythonEnv;
- Type: projen.python.IPythonEnv
API for mangaging the Python runtime environment.
moduleName
Required
public readonly moduleName: string;
- Type: string
Python module name (the project name, with any hyphens or periods replaced with underscores).
version
Required
public readonly version: string;
- Type: string
Version of the package for distribution (should follow semver).
packagingManager
Optional
public readonly packagingManager: IPythonPackaging;
- Type: projen.python.IPythonPackaging
API for managing packaging the project as a library.
Only applies when the projectType
is LIB.
pytest
Optional
public readonly pytest: Pytest;
- Type: projen.python.Pytest
Pytest component.
nx
Required
public readonly nx: NxWorkspace;
- Type: NxWorkspace
Return the NxWorkspace instance.
This should be implemented using a getter.
nxConfigurator
Required
public readonly nxConfigurator: NxConfigurator;
- Type: NxConfigurator
Constants
Name | Type | Description |
---|---|---|
DEFAULT_TASK |
string |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TASK
Required
public readonly DEFAULT_TASK: string;
- Type: string
The name of the default task (the task executed when projen
is run without arguments).
Normally this task should synthesize the project files.
MonorepoTsProject
- Implements: INxProjectCore
This project type will bootstrap a monorepo with support for polygot builds, build caching, dependency graph visualization and much more.
Initializers
import { MonorepoTsProject } from '@aws/pdk/monorepo'
new MonorepoTsProject(options: MonorepoTsProjectOptions)
Name | Type | Description |
---|---|---|
options |
MonorepoTsProjectOptions |
No description. |
options
Required
- Type: MonorepoTsProjectOptions
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
addExcludeFromCleanup |
Exclude the matching files from pre-synth cleanup. |
addGitIgnore |
Adds a .gitignore pattern. |
addPackageIgnore |
Adds patterns to be ignored by npm. |
addTask |
Adds a new task to this project. |
addTip |
Prints a "tip" message during synthesis. |
annotateGenerated |
Marks the provided file(s) as being generated. |
postSynthesize |
Called after all components are synthesized. |
preSynthesize |
Called before all components are synthesized. |
removeTask |
Removes a task from a project. |
runTaskCommand |
Returns the shell command to execute in order to run a task. |
synth |
Synthesize all project files into outdir . |
tryFindFile |
Finds a file at the specified relative path within this project and all its subprojects. |
tryFindJsonFile |
Finds a json file by name. |
tryFindObjectFile |
Finds an object file (like JsonFile, YamlFile, etc.) by name. |
tryRemoveFile |
Finds a file at the specified relative path within this project and removes it. |
addBins |
No description. |
addBundledDeps |
Defines bundled dependencies. |
addCompileCommand |
DEPRECATED. |
addDeps |
Defines normal dependencies. |
addDevDeps |
Defines development/test dependencies. |
addFields |
Directly set fields in package.json . |
addKeywords |
Adds keywords to package.json (deduplicated). |
addPeerDeps |
Defines peer dependencies. |
addScripts |
Replaces the contents of multiple npm package.json scripts. |
addTestCommand |
DEPRECATED. |
hasScript |
Indicates if a script by the name name is defined. |
removeScript |
Removes the npm script (always successful). |
renderWorkflowSetup |
Returns the set of workflow steps which should be executed to bootstrap a workflow. |
setScript |
Replaces the contents of an npm package.json script. |
addImplicitDependency |
Create an implicit dependency between two Projects. |
addJavaDependency |
Adds a dependency between two Java Projects in the monorepo. |
addNxRunManyTask |
Add project task that executes npx nx run-many ... style command. |
addPythonPoetryDependency |
Adds a dependency between two Python Projects in the monorepo. |
addWorkspacePackages |
Add one or more additional package globs to the workspace. |
composeNxRunManyCommand |
Helper to format npx nx run-many ... style command. |
execNxRunManyCommand |
Helper to format npx nx run-many ... style command execution in package manager. |
toString
public toString(): string
Returns a string representation of this construct.
addExcludeFromCleanup
public addExcludeFromCleanup(globs: string): void
Exclude the matching files from pre-synth cleanup.
Can be used when, for example, some source files include the projen marker and we don't want them to be erased during synth.
globs
Required
- Type: string
The glob patterns to match.
addGitIgnore
public addGitIgnore(pattern: string): void
Adds a .gitignore pattern.
pattern
Required
- Type: string
The glob pattern to ignore.
addPackageIgnore
public addPackageIgnore(pattern: string): void
Adds patterns to be ignored by npm.
pattern
Required
- Type: string
The pattern to ignore.
addTask
public addTask(name: string, props?: TaskOptions): Task
Adds a new task to this project.
This will fail if the project already has a task with this name.
name
Required
- Type: string
The task name to add.
props
Optional
- Type: projen.TaskOptions
Task properties.
~~addTip
~~
public addTip(message: string): void
Prints a "tip" message during synthesis.
message
Required
- Type: string
The message.
annotateGenerated
public annotateGenerated(glob: string): void
Marks the provided file(s) as being generated.
This is achieved using the github-linguist attributes. Generated files do not count against the repository statistics and language breakdown.
https://github.com/github/linguist/blob/master/docs/overrides.md
glob
Required
- Type: string
the glob pattern to match (could be a file path).
postSynthesize
public postSynthesize(): void
Called after all components are synthesized.
Order is not guaranteed.
preSynthesize
public preSynthesize(): void
Called before all components are synthesized.
removeTask
public removeTask(name: string): Task
Removes a task from a project.
name
Required
- Type: string
The name of the task to remove.
runTaskCommand
public runTaskCommand(task: Task): string
Returns the shell command to execute in order to run a task.
This will
typically be npx projen TASK
.
task
Required
- Type: projen.Task
The task for which the command is required.
synth
public synth(): void
Synthesize all project files into outdir
.
- Call "this.preSynthesize()"
- Delete all generated files
- Synthesize all subprojects
- Synthesize all components of this project
- Call "postSynthesize()" for all components of this project
- Call "this.postSynthesize()"
tryFindFile
public tryFindFile(filePath: string): FileBase
Finds a file at the specified relative path within this project and all its subprojects.
filePath
Required
- Type: string
The file path.
If this path is relative, it will be resolved from the root of this project.
~~tryFindJsonFile
~~
public tryFindJsonFile(filePath: string): JsonFile
Finds a json file by name.
filePath
Required
- Type: string
The file path.
tryFindObjectFile
public tryFindObjectFile(filePath: string): ObjectFile
Finds an object file (like JsonFile, YamlFile, etc.) by name.
filePath
Required
- Type: string
The file path.
tryRemoveFile
public tryRemoveFile(filePath: string): FileBase
Finds a file at the specified relative path within this project and removes it.
filePath
Required
- Type: string
The file path.
If this path is relative, it will be resolved from the root of this project.
addBins
public addBins(bins: {[ key: string ]: string}): void
bins
Required
- Type: {[ key: string ]: string}
addBundledDeps
public addBundledDeps(deps: string): void
Defines bundled dependencies.
Bundled dependencies will be added as normal dependencies as well as to the
bundledDependencies
section of your package.json
.
deps
Required
- Type: string
Names modules to install.
By default, the the dependency will
be installed in the next npx projen
run and the version will be recorded
in your package.json
file. You can upgrade manually or using yarn
add/upgrade
. If you wish to specify a version range use this syntax:
module@^7
.
~~addCompileCommand
~~
public addCompileCommand(commands: string): void
DEPRECATED.
commands
Required
- Type: string
addDeps
public addDeps(deps: string): void
Defines normal dependencies.
deps
Required
- Type: string
Names modules to install.
By default, the the dependency will
be installed in the next npx projen
run and the version will be recorded
in your package.json
file. You can upgrade manually or using yarn
add/upgrade
. If you wish to specify a version range use this syntax:
module@^7
.
addDevDeps
public addDevDeps(deps: string): void
Defines development/test dependencies.
deps
Required
- Type: string
Names modules to install.
By default, the the dependency will
be installed in the next npx projen
run and the version will be recorded
in your package.json
file. You can upgrade manually or using yarn
add/upgrade
. If you wish to specify a version range use this syntax:
module@^7
.
addFields
public addFields(fields: {[ key: string ]: any}): void
Directly set fields in package.json
.
fields
Required
- Type: {[ key: string ]: any}
The fields to set.
addKeywords
public addKeywords(keywords: string): void
Adds keywords to package.json (deduplicated).
keywords
Required
- Type: string
The keywords to add.
addPeerDeps
public addPeerDeps(deps: string): void
Defines peer dependencies.
When adding peer dependencies, a devDependency will also be added on the pinned version of the declared peer. This will ensure that you are testing your code against the minimum version required from your consumers.
deps
Required
- Type: string
Names modules to install.
By default, the the dependency will
be installed in the next npx projen
run and the version will be recorded
in your package.json
file. You can upgrade manually or using yarn
add/upgrade
. If you wish to specify a version range use this syntax:
module@^7
.
addScripts
public addScripts(scripts: {[ key: string ]: string}): void
Replaces the contents of multiple npm package.json scripts.
scripts
Required
- Type: {[ key: string ]: string}
The scripts to set.
~~addTestCommand
~~
public addTestCommand(commands: string): void
DEPRECATED.
commands
Required
- Type: string
~~hasScript
~~
public hasScript(name: string): boolean
Indicates if a script by the name name is defined.
name
Required
- Type: string
The name of the script.
removeScript
public removeScript(name: string): void
Removes the npm script (always successful).
name
Required
- Type: string
The name of the script.
renderWorkflowSetup
public renderWorkflowSetup(options?: RenderWorkflowSetupOptions): JobStep[]
Returns the set of workflow steps which should be executed to bootstrap a workflow.
options
Optional
- Type: projen.javascript.RenderWorkflowSetupOptions
Options.
setScript
public setScript(name: string, command: string): void
Replaces the contents of an npm package.json script.
name
Required
- Type: string
The script name.
command
Required
- Type: string
The command to execute.
addImplicitDependency
public addImplicitDependency(dependent: Project, dependee: string | Project): void
Create an implicit dependency between two Projects.
This is typically used in polygot repos where a Typescript project wants a build dependency on a Python project as an example.
dependent
Required
- Type: projen.Project
dependee
Required
- Type: string | projen.Project
addJavaDependency
public addJavaDependency(dependent: JavaProject, dependee: JavaProject): void
Adds a dependency between two Java Projects in the monorepo.
dependent
Required
- Type: projen.java.JavaProject
dependee
Required
- Type: projen.java.JavaProject
addNxRunManyTask
public addNxRunManyTask(name: string, options: RunManyOptions): Task
Add project task that executes npx nx run-many ...
style command.
name
Required
- Type: string
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
addPythonPoetryDependency
public addPythonPoetryDependency(dependent: PythonProject, dependee: PythonProject): void
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependent
Required
- Type: projen.python.PythonProject
dependee
Required
- Type: projen.python.PythonProject
addWorkspacePackages
public addWorkspacePackages(packageGlobs: string): void
Add one or more additional package globs to the workspace.
packageGlobs
Required
- Type: string
paths to the package to include in the workspace (for example packages/my-package).
composeNxRunManyCommand
public composeNxRunManyCommand(options: RunManyOptions): string[]
Helper to format npx nx run-many ...
style command.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
execNxRunManyCommand
public execNxRunManyCommand(options: RunManyOptions): string
Helper to format npx nx run-many ...
style command execution in package manager.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isProject |
Test whether the given construct is a project. |
of |
Find the closest ancestor project for given construct. |
isConstruct
import { MonorepoTsProject } from '@aws/pdk/monorepo'
MonorepoTsProject.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: any
Any object.
isProject
import { MonorepoTsProject } from '@aws/pdk/monorepo'
MonorepoTsProject.isProject(x: any)
Test whether the given construct is a project.
x
Required
- Type: any
of
import { MonorepoTsProject } from '@aws/pdk/monorepo'
MonorepoTsProject.of(construct: IConstruct)
Find the closest ancestor project for given construct.
When given a project, this it the project itself.
construct
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
buildTask |
projen.Task |
No description. |
commitGenerated |
boolean |
Whether to commit the managed files by default. |
compileTask |
projen.Task |
No description. |
components |
projen.Component[] |
Returns all the components within this project. |
deps |
projen.Dependencies |
Project dependencies. |
ejected |
boolean |
Whether or not the project is being ejected. |
files |
projen.FileBase[] |
All files in this project. |
gitattributes |
projen.GitAttributesFile |
The .gitattributes file for this repository. |
gitignore |
projen.IgnoreFile |
.gitignore. |
logger |
projen.Logger |
Logging utilities. |
name |
string |
Project name. |
outdir |
string |
Absolute output directory of this project. |
packageTask |
projen.Task |
No description. |
postCompileTask |
projen.Task |
No description. |
preCompileTask |
projen.Task |
No description. |
projectBuild |
projen.ProjectBuild |
Manages the build process of the project. |
projenCommand |
string |
The command to use in order to run the projen CLI. |
root |
projen.Project |
The root project. |
subprojects |
projen.Project[] |
Returns all the subprojects within this project. |
tasks |
projen.Tasks |
Project tasks. |
testTask |
projen.Task |
No description. |
defaultTask |
projen.Task |
This is the "default" task, the one that executes "projen". |
initProject |
projen.InitProject |
The options used when this project is bootstrapped via projen new . |
parent |
projen.Project |
A parent project. |
projectType |
projen.ProjectType |
No description. |
autoApprove |
projen.github.AutoApprove |
Auto approve set up for this project. |
devContainer |
projen.vscode.DevContainer |
Access for .devcontainer.json (used for GitHub Codespaces). |
github |
projen.github.GitHub |
Access all github components. |
gitpod |
projen.Gitpod |
Access for Gitpod. |
vscode |
projen.vscode.VsCode |
Access all VSCode components. |
allowLibraryDependencies |
boolean |
No description. |
artifactsDirectory |
string |
The build output directory. |
artifactsJavascriptDirectory |
string |
The location of the npm tarball after build (${artifactsDirectory}/js ). |
bundler |
projen.javascript.Bundler |
No description. |
entrypoint |
string |
No description. |
manifest |
any |
No description. |
npmrc |
projen.javascript.NpmConfig |
The .npmrc file. |
package |
projen.javascript.NodePackage |
API for managing the node package. |
packageManager |
projen.javascript.NodePackageManager |
The package manager to use. |
runScriptCommand |
string |
The command to use to run scripts (e.g. yarn run or npm run depends on the package manager). |
autoMerge |
projen.github.AutoMerge |
Component that sets up mergify for merging approved pull requests. |
buildWorkflow |
projen.build.BuildWorkflow |
The PR build GitHub workflow. |
buildWorkflowJobId |
string |
The job ID of the build workflow. |
jest |
projen.javascript.Jest |
The Jest configuration (if enabled). |
maxNodeVersion |
string |
Maximum node version required by this package. |
minNodeVersion |
string |
Minimum node.js version required by this package. |
npmignore |
projen.IgnoreFile |
The .npmignore file. |
prettier |
projen.javascript.Prettier |
No description. |
publisher |
projen.release.Publisher |
Package publisher. |
release |
projen.release.Release |
Release management. |
upgradeWorkflow |
projen.javascript.UpgradeDependencies |
The upgrade workflow. |
docsDirectory |
string |
No description. |
libdir |
string |
The directory in which compiled .js files reside. |
srcdir |
string |
The directory in which the .ts sources reside. |
testdir |
string |
The directory in which tests reside. |
tsconfigDev |
projen.javascript.TypescriptConfig |
A typescript configuration file which covers all files (sources, tests, projen). |
watchTask |
projen.Task |
The "watch" task. |
docgen |
boolean |
No description. |
eslint |
projen.javascript.Eslint |
No description. |
tsconfig |
projen.javascript.TypescriptConfig |
No description. |
tsconfigEslint |
projen.javascript.TypescriptConfig |
No description. |
nx |
NxWorkspace |
Return the NxWorkspace instance. |
nxConfigurator |
NxConfigurator |
No description. |
sortedSubProjects |
projen.Project[] |
Get consistently sorted list of subprojects. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
buildTask
Required
public readonly buildTask: Task;
- Type: projen.Task
commitGenerated
Required
public readonly commitGenerated: boolean;
- Type: boolean
Whether to commit the managed files by default.
compileTask
Required
public readonly compileTask: Task;
- Type: projen.Task
components
Required
public readonly components: Component[];
- Type: projen.Component[]
Returns all the components within this project.
deps
Required
public readonly deps: Dependencies;
- Type: projen.Dependencies
Project dependencies.
ejected
Required
public readonly ejected: boolean;
- Type: boolean
Whether or not the project is being ejected.
files
Required
public readonly files: FileBase[];
- Type: projen.FileBase[]
All files in this project.
gitattributes
Required
public readonly gitattributes: GitAttributesFile;
- Type: projen.GitAttributesFile
The .gitattributes file for this repository.
gitignore
Required
public readonly gitignore: IgnoreFile;
- Type: projen.IgnoreFile
.gitignore.
logger
Required
public readonly logger: Logger;
- Type: projen.Logger
Logging utilities.
name
Required
public readonly name: string;
- Type: string
Project name.
outdir
Required
public readonly outdir: string;
- Type: string
Absolute output directory of this project.
packageTask
Required
public readonly packageTask: Task;
- Type: projen.Task
postCompileTask
Required
public readonly postCompileTask: Task;
- Type: projen.Task
preCompileTask
Required
public readonly preCompileTask: Task;
- Type: projen.Task
projectBuild
Required
public readonly projectBuild: ProjectBuild;
- Type: projen.ProjectBuild
Manages the build process of the project.
projenCommand
Required
public readonly projenCommand: string;
- Type: string
The command to use in order to run the projen CLI.
root
Required
public readonly root: Project;
- Type: projen.Project
The root project.
subprojects
Required
public readonly subprojects: Project[];
- Type: projen.Project[]
Returns all the subprojects within this project.
tasks
Required
public readonly tasks: Tasks;
- Type: projen.Tasks
Project tasks.
testTask
Required
public readonly testTask: Task;
- Type: projen.Task
defaultTask
Optional
public readonly defaultTask: Task;
- Type: projen.Task
This is the "default" task, the one that executes "projen".
Undefined if the project is being ejected.
initProject
Optional
public readonly initProject: InitProject;
- Type: projen.InitProject
The options used when this project is bootstrapped via projen new
.
It includes the original set of options passed to the CLI and also the JSII FQN of the project type.
parent
Optional
public readonly parent: Project;
- Type: projen.Project
A parent project.
If undefined, this is the root project.
projectType
Required
public readonly projectType: ProjectType;
- Type: projen.ProjectType
autoApprove
Optional
public readonly autoApprove: AutoApprove;
- Type: projen.github.AutoApprove
Auto approve set up for this project.
devContainer
Optional
public readonly devContainer: DevContainer;
- Type: projen.vscode.DevContainer
Access for .devcontainer.json (used for GitHub Codespaces).
This will be undefined
if devContainer boolean is false
github
Optional
public readonly github: GitHub;
- Type: projen.github.GitHub
Access all github components.
This will be undefined
for subprojects.
gitpod
Optional
public readonly gitpod: Gitpod;
- Type: projen.Gitpod
Access for Gitpod.
This will be undefined
if gitpod boolean is false
vscode
Optional
public readonly vscode: VsCode;
- Type: projen.vscode.VsCode
Access all VSCode components.
This will be undefined
for subprojects.
~~allowLibraryDependencies
~~Required
- Deprecated: use
package.allowLibraryDependencies
public readonly allowLibraryDependencies: boolean;
- Type: boolean
artifactsDirectory
Required
public readonly artifactsDirectory: string;
- Type: string
The build output directory.
An npm tarball will be created under the js
subdirectory. For example, if this is set to dist
(the default), the npm
tarball will be placed under dist/js/boom-boom-1.2.3.tg
.
artifactsJavascriptDirectory
Required
public readonly artifactsJavascriptDirectory: string;
- Type: string
The location of the npm tarball after build (${artifactsDirectory}/js
).
bundler
Required
public readonly bundler: Bundler;
- Type: projen.javascript.Bundler
~~entrypoint
~~Required
- Deprecated: use
package.entrypoint
public readonly entrypoint: string;
- Type: string
~~manifest
~~Required
- Deprecated: use
package.addField(x, y)
public readonly manifest: any;
- Type: any
npmrc
Required
public readonly npmrc: NpmConfig;
- Type: projen.javascript.NpmConfig
The .npmrc file.
package
Required
public readonly package: NodePackage;
- Type: projen.javascript.NodePackage
API for managing the node package.
~~packageManager
~~Required
- Deprecated: use
package.packageManager
public readonly packageManager: NodePackageManager;
- Type: projen.javascript.NodePackageManager
The package manager to use.
runScriptCommand
Required
public readonly runScriptCommand: string;
- Type: string
The command to use to run scripts (e.g. yarn run
or npm run
depends on the package manager).
autoMerge
Optional
public readonly autoMerge: AutoMerge;
- Type: projen.github.AutoMerge
Component that sets up mergify for merging approved pull requests.
buildWorkflow
Optional
public readonly buildWorkflow: BuildWorkflow;
- Type: projen.build.BuildWorkflow
The PR build GitHub workflow.
undefined
if buildWorkflow
is disabled.
buildWorkflowJobId
Optional
public readonly buildWorkflowJobId: string;
- Type: string
The job ID of the build workflow.
jest
Optional
public readonly jest: Jest;
- Type: projen.javascript.Jest
The Jest configuration (if enabled).
maxNodeVersion
Optional
public readonly maxNodeVersion: string;
- Type: string
Maximum node version required by this package.
minNodeVersion
Optional
public readonly minNodeVersion: string;
- Type: string
Minimum node.js version required by this package.
npmignore
Optional
public readonly npmignore: IgnoreFile;
- Type: projen.IgnoreFile
The .npmignore file.
prettier
Optional
public readonly prettier: Prettier;
- Type: projen.javascript.Prettier
~~publisher
~~Optional
- Deprecated: use
release.publisher
.
public readonly publisher: Publisher;
- Type: projen.release.Publisher
Package publisher.
This will be undefined
if the project does not have a
release workflow.
release
Optional
public readonly release: Release;
- Type: projen.release.Release
Release management.
upgradeWorkflow
Optional
public readonly upgradeWorkflow: UpgradeDependencies;
- Type: projen.javascript.UpgradeDependencies
The upgrade workflow.
docsDirectory
Required
public readonly docsDirectory: string;
- Type: string
libdir
Required
public readonly libdir: string;
- Type: string
The directory in which compiled .js files reside.
srcdir
Required
public readonly srcdir: string;
- Type: string
The directory in which the .ts sources reside.
testdir
Required
public readonly testdir: string;
- Type: string
The directory in which tests reside.
tsconfigDev
Required
public readonly tsconfigDev: TypescriptConfig;
- Type: projen.javascript.TypescriptConfig
A typescript configuration file which covers all files (sources, tests, projen).
watchTask
Required
public readonly watchTask: Task;
- Type: projen.Task
The "watch" task.
docgen
Optional
public readonly docgen: boolean;
- Type: boolean
eslint
Optional
public readonly eslint: Eslint;
- Type: projen.javascript.Eslint
tsconfig
Optional
public readonly tsconfig: TypescriptConfig;
- Type: projen.javascript.TypescriptConfig
tsconfigEslint
Optional
public readonly tsconfigEslint: TypescriptConfig;
- Type: projen.javascript.TypescriptConfig
nx
Required
public readonly nx: NxWorkspace;
- Type: NxWorkspace
Return the NxWorkspace instance.
This should be implemented using a getter.
nxConfigurator
Required
public readonly nxConfigurator: NxConfigurator;
- Type: NxConfigurator
sortedSubProjects
Required
public readonly sortedSubProjects: Project[];
- Type: projen.Project[]
Get consistently sorted list of subprojects.
Constants
Name | Type | Description |
---|---|---|
DEFAULT_TASK |
string |
The name of the default task (the task executed when projen is run without arguments). |
DEFAULT_TS_JEST_TRANFORM_PATTERN |
string |
No description. |
DEFAULT_TASK
Required
public readonly DEFAULT_TASK: string;
- Type: string
The name of the default task (the task executed when projen
is run without arguments).
Normally this task should synthesize the project files.
DEFAULT_TS_JEST_TRANFORM_PATTERN
Required
public readonly DEFAULT_TS_JEST_TRANFORM_PATTERN: string;
- Type: string
NxConfigurator
- Implements: INxProjectCore
Configues common NX related tasks and methods.
Initializers
import { NxConfigurator } from '@aws/pdk/monorepo'
new NxConfigurator(project: Project, options?: NxConfiguratorOptions)
Name | Type | Description |
---|---|---|
project |
projen.Project |
No description. |
options |
NxConfiguratorOptions |
No description. |
project
Required
- Type: projen.Project
options
Optional
- Type: NxConfiguratorOptions
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
addImplicitDependency |
Create an implicit dependency between two Projects. |
addJavaDependency |
Adds a dependency between two Java Projects in the monorepo. |
addNxRunManyTask |
Add project task that executes npx nx run-many ... style command. |
addPythonPoetryDependency |
Adds a dependency between two Python Projects in the monorepo. |
composeNxRunManyCommand |
Helper to format npx nx run-many ... style command. |
ensureNxInstallTask |
Returns the install task or creates one with nx installation command added. |
execNxRunManyCommand |
Helper to format npx nx run-many ... style command execution in package manager. |
patchPoetryEnv |
No description. |
patchPythonProjects |
No description. |
synth |
No description. |
toString
public toString(): string
Returns a string representation of this construct.
postSynthesize
public postSynthesize(): void
Called after synthesis.
Order is not guaranteed.
preSynthesize
public preSynthesize(): void
Called before synthesis.
synthesize
public synthesize(): void
Synthesizes files to the project output directory.
addImplicitDependency
public addImplicitDependency(dependent: Project, dependee: string | Project): void
Create an implicit dependency between two Projects.
This is typically used in polygot repos where a Typescript project wants a build dependency on a Python project as an example.
dependent
Required
- Type: projen.Project
project you want to have the dependency.
dependee
Required
- Type: string | projen.Project
project you wish to depend on.
addJavaDependency
public addJavaDependency(dependent: JavaProject, dependee: JavaProject): void
Adds a dependency between two Java Projects in the monorepo.
dependent
Required
- Type: projen.java.JavaProject
project you want to have the dependency.
dependee
Required
- Type: projen.java.JavaProject
project you wish to depend on.
addNxRunManyTask
public addNxRunManyTask(name: string, options: RunManyOptions): Task
Add project task that executes npx nx run-many ...
style command.
name
Required
- Type: string
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
addPythonPoetryDependency
public addPythonPoetryDependency(dependent: PythonProject, dependee: PythonProject): void
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependent
Required
- Type: projen.python.PythonProject
project you want to have the dependency (must be a Poetry Python Project).
dependee
Required
- Type: projen.python.PythonProject
project you wish to depend on.
composeNxRunManyCommand
public composeNxRunManyCommand(options: RunManyOptions): string[]
Helper to format npx nx run-many ...
style command.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
ensureNxInstallTask
public ensureNxInstallTask(nxPlugins: {[ key: string ]: string}): Task
Returns the install task or creates one with nx installation command added.
Note: this should only be called from non-node projects
nxPlugins
Required
- Type: {[ key: string ]: string}
additional plugins to install.
execNxRunManyCommand
public execNxRunManyCommand(options: RunManyOptions): string
Helper to format npx nx run-many ...
style command execution in package manager.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
patchPoetryEnv
public patchPoetryEnv(project: PythonProject): void
project
Required
- Type: projen.python.PythonProject
patchPythonProjects
public patchPythonProjects(projects: Project[]): void
projects
Required
- Type: projen.Project[]
synth
public synth(): void
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
isConstruct
import { NxConfigurator } from '@aws/pdk/monorepo'
NxConfigurator.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: any
Any object.
isComponent
import { NxConfigurator } from '@aws/pdk/monorepo'
NxConfigurator.isComponent(x: any)
Test whether the given construct is a component.
x
Required
- Type: any
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
project |
projen.Project |
No description. |
nx |
NxWorkspace |
Return the NxWorkspace instance. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
project
Required
public readonly project: Project;
- Type: projen.Project
nx
Required
public readonly nx: NxWorkspace;
- Type: NxWorkspace
Return the NxWorkspace instance.
This should be implemented using a getter.
NxProject
Component which manages the project specific NX Config and is added to all NXMonorepo subprojects.
Initializers
import { NxProject } from '@aws/pdk/monorepo'
new NxProject(project: Project)
Name | Type | Description |
---|---|---|
project |
projen.Project |
No description. |
project
Required
- Type: projen.Project
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
addBuildTargetFiles |
Add input and output files to build target. |
addImplicitDependency |
Adds an implicit dependency between the dependant (this project) and dependee. |
addJavaDependency |
Adds a dependency between two Java Projects in the monorepo. |
addPythonPoetryDependency |
Adds a dependency between two Python Projects in the monorepo. |
addTag |
Add tag. |
inferTargets |
Automatically infer targets based on project type. |
merge |
Merge configuration into existing config. |
setNamedInput |
Set namedInputs helper. |
setTarget |
Set targets helper. |
toString
public toString(): string
Returns a string representation of this construct.
postSynthesize
public postSynthesize(): void
Called after synthesis.
Order is not guaranteed.
preSynthesize
public preSynthesize(): void
Called before synthesis.
synthesize
public synthesize(): void
Synthesizes files to the project output directory.
addBuildTargetFiles
public addBuildTargetFiles(inputs?: string | IInput[], outputs?: string[]): void
Add input and output files to build target.
inputs
Optional
- Type: string | aws/pdk/monorepo.Nx.IInput[]
Input files.
outputs
Optional
- Type: string[]
Output files.
addImplicitDependency
public addImplicitDependency(dependee: string | Project): void
Adds an implicit dependency between the dependant (this project) and dependee.
dependee
Required
- Type: string | projen.Project
project to add the implicit dependency on.
addJavaDependency
public addJavaDependency(dependee: JavaProject): void
Adds a dependency between two Java Projects in the monorepo.
dependee
Required
- Type: projen.java.JavaProject
project you wish to depend on.
addPythonPoetryDependency
public addPythonPoetryDependency(dependee: PythonProject): void
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependee
Required
- Type: projen.python.PythonProject
project you wish to depend on.
addTag
public addTag(tags: string): void
Add tag.
tags
Required
- Type: string
inferTargets
public inferTargets(): void
Automatically infer targets based on project type.
merge
public merge(config: ProjectConfig): void
Merge configuration into existing config.
config
Required
- Type: aws/pdk/monorepo.Nx.ProjectConfig
setNamedInput
public setNamedInput(name: string, inputs: string[]): void
Set namedInputs
helper.
name
Required
- Type: string
inputs
Required
- Type: string[]
setTarget
public setTarget(name: string, target: IProjectTarget, includeDefaults?: string | boolean): void
Set targets
helper.
name
Required
- Type: string
target
Required
- Type: aws/pdk/monorepo.Nx.IProjectTarget
includeDefaults
Optional
- Type: string | boolean
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
ensure |
Retrieves an instance of NXProject if one is associated to the given project, otherwise created a NXProject instance for the project. |
of |
Retrieves an instance of NXProject if one is associated to the given project. |
isConstruct
import { NxProject } from '@aws/pdk/monorepo'
NxProject.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: any
Any object.
isComponent
import { NxProject } from '@aws/pdk/monorepo'
NxProject.isComponent(x: any)
Test whether the given construct is a component.
x
Required
- Type: any
ensure
import { NxProject } from '@aws/pdk/monorepo'
NxProject.ensure(project: Project)
Retrieves an instance of NXProject if one is associated to the given project, otherwise created a NXProject instance for the project.
project
Required
- Type: projen.Project
project instance.
of
import { NxProject } from '@aws/pdk/monorepo'
NxProject.of(project: Project)
Retrieves an instance of NXProject if one is associated to the given project.
project
Required
- Type: projen.Project
project instance.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
project |
projen.Project |
No description. |
file |
projen.JsonFile |
Raw json file. |
implicitDependencies |
string[] |
Implicit dependencies. |
includedScripts |
string[] |
Explicit list of scripts for Nx to include. |
namedInputs |
{[ key: string ]: any} |
Named inputs. |
tags |
string[] |
Project tag annotations. |
targets |
{[ key: string ]: any} |
Targets configuration. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
project
Required
public readonly project: Project;
- Type: projen.Project
file
Required
public readonly file: JsonFile;
- Type: projen.JsonFile
Raw json file.
Attention: any overrides applied here will not be visible in the properties and only included in final synthesized output, and likely to override native handling.
implicitDependencies
Required
public readonly implicitDependencies: string[];
- Type: string[]
Implicit dependencies.
https://nx.dev/reference/project-configuration#implicitdependencies
includedScripts
Required
public readonly includedScripts: string[];
- Type: string[]
Explicit list of scripts for Nx to include.
https://nx.dev/reference/project-configuration#ignoring-package.json-scripts
namedInputs
Required
public readonly namedInputs: {[ key: string ]: any};
- Type: {[ key: string ]: any}
Named inputs.
tags
Required
public readonly tags: string[];
- Type: string[]
Project tag annotations.
targets
Required
public readonly targets: {[ key: string ]: any};
- Type: {[ key: string ]: any}
Targets configuration.
NxWorkspace
Component which manages the workspace specific NX Config for the root monorepo.
Initializers
import { NxWorkspace } from '@aws/pdk/monorepo'
new NxWorkspace(project: Project)
Name | Type | Description |
---|---|---|
project |
projen.Project |
No description. |
project
Required
- Type: projen.Project
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
postSynthesize |
Called after synthesis. |
preSynthesize |
Called before synthesis. |
synthesize |
Synthesizes files to the project output directory. |
setNamedInput |
Set namedInput value helper. |
setTargetDefault |
Set targetDefaults helper. |
useNxCloud |
Setup workspace to use nx-cloud. |
toString
public toString(): string
Returns a string representation of this construct.
postSynthesize
public postSynthesize(): void
Called after synthesis.
Order is not guaranteed.
preSynthesize
public preSynthesize(): void
Called before synthesis.
synthesize
public synthesize(): void
Synthesizes files to the project output directory.
setNamedInput
public setNamedInput(name: string, inputs: string[]): void
Set namedInput
value helper.
name
Required
- Type: string
inputs
Required
- Type: string[]
setTargetDefault
public setTargetDefault(name: string, target: IProjectTarget, merge?: boolean): void
Set targetDefaults
helper.
name
Required
- Type: string
target
Required
- Type: aws/pdk/monorepo.Nx.IProjectTarget
merge
Optional
- Type: boolean
useNxCloud
public useNxCloud(readOnlyAccessToken: string): void
Setup workspace to use nx-cloud.
readOnlyAccessToken
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isComponent |
Test whether the given construct is a component. |
of |
Retrieves the singleton instance associated with project root. |
isConstruct
import { NxWorkspace } from '@aws/pdk/monorepo'
NxWorkspace.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
x
Required
- Type: any
Any object.
isComponent
import { NxWorkspace } from '@aws/pdk/monorepo'
NxWorkspace.isComponent(x: any)
Test whether the given construct is a component.
x
Required
- Type: any
of
import { NxWorkspace } from '@aws/pdk/monorepo'
NxWorkspace.of(scope: Project)
Retrieves the singleton instance associated with project root.
scope
Required
- Type: projen.Project
project instance.
Properties
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
project |
projen.Project |
No description. |
nxIgnore |
projen.IgnoreFile |
.nxignore file. |
nxJson |
projen.JsonFile |
Raw nx.json file to support overrides that aren't handled directly. |
affected |
aws/pdk/monorepo.Nx.INxAffectedConfig |
Default options for nx affected . |
autoInferProjectTargets |
boolean |
Automatically infer NxProject targets based on project type. |
cacheableOperations |
string[] |
List of cacheable operations. |
defaultTaskRunner |
string |
Default task runner. |
defaultTaskRunnerOptions |
{[ key: string ]: any} |
Default task runner options. |
extends |
string |
Some presets use the extends property to hide some default options in a separate json file. |
namedInputs |
{[ key: string ]: string[]} |
Named inputs. |
nonNativeHasher |
boolean |
Indicates if non-native nx hasher will be used. |
npmScope |
string |
Tells Nx what prefix to use when generating library imports. |
plugins |
string[] |
Plugins for extending the project graph. |
pluginsConfig |
{[ key: string ]: any} |
Configuration for Nx Plugins. |
targetDefaults |
{[ key: string ]: aws/pdk/monorepo.Nx.IProjectTarget} |
Dependencies between different target names across all projects. |
tasksRunnerOptions |
{[ key: string ]: any} |
Task runner options. |
cacheDirectory |
string |
Override the default nx cacheDirectory. |
workspaceLayout |
aws/pdk/monorepo.Nx.IWorkspaceLayout |
Where new apps + libs should be placed. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
project
Required
public readonly project: Project;
- Type: projen.Project
nxIgnore
Required
public readonly nxIgnore: IgnoreFile;
- Type: projen.IgnoreFile
.nxignore file.
nxJson
Required
public readonly nxJson: JsonFile;
- Type: projen.JsonFile
Raw nx.json file to support overrides that aren't handled directly.
Attention: any overrides applied here will not be visible in the properties and only included in final synthesized output, and likely to override native handling.
affected
Required
public readonly affected: INxAffectedConfig;
- Type: aws/pdk/monorepo.Nx.INxAffectedConfig
Default options for nx affected
.
autoInferProjectTargets
Required
public readonly autoInferProjectTargets: boolean;
- Type: boolean
Automatically infer NxProject targets based on project type.
cacheableOperations
Required
public readonly cacheableOperations: string[];
- Type: string[]
List of cacheable operations.
defaultTaskRunner
Required
public readonly defaultTaskRunner: string;
- Type: string
Default task runner.
defaultTaskRunnerOptions
Required
public readonly defaultTaskRunnerOptions: {[ key: string ]: any};
- Type: {[ key: string ]: any}
Default task runner options.
extends
Required
public readonly extends: string;
- Type: string
- Default: "nx/presets/npm.json"
Some presets use the extends property to hide some default options in a separate json file.
The json file specified in the extends property is located in your node_modules folder. The Nx preset files are specified in the nx package.
namedInputs
Required
public readonly namedInputs: {[ key: string ]: string[]};
- Type: {[ key: string ]: string[]}
Named inputs.
nonNativeHasher
Required
public readonly nonNativeHasher: boolean;
- Type: boolean
Indicates if non-native nx hasher will be used.
If true, the NX_NON_NATIVE_HASHER env var will be set to true for all project tasks.
npmScope
Required
public readonly npmScope: string;
- Type: string
Tells Nx what prefix to use when generating library imports.
plugins
Required
public readonly plugins: string[];
- Type: string[]
Plugins for extending the project graph.
pluginsConfig
Required
public readonly pluginsConfig: {[ key: string ]: any};
- Type: {[ key: string ]: any}
Configuration for Nx Plugins.
targetDefaults
Required
public readonly targetDefaults: {[ key: string ]: IProjectTarget};
- Type: {[ key: string ]: aws/pdk/monorepo.Nx.IProjectTarget}
Dependencies between different target names across all projects.
tasksRunnerOptions
Required
public readonly tasksRunnerOptions: {[ key: string ]: any};
- Type: {[ key: string ]: any}
Task runner options.
cacheDirectory
Optional
public readonly cacheDirectory: string;
- Type: string
Override the default nx cacheDirectory.
workspaceLayout
Optional
public readonly workspaceLayout: IWorkspaceLayout;
- Type: aws/pdk/monorepo.Nx.IWorkspaceLayout
Where new apps + libs should be placed.
Structs
CliConfig
Initializer
import { Syncpack } from '@aws/pdk/monorepo'
const cliConfig: Syncpack.CliConfig = { ... }
Properties
Name | Type | Description |
---|---|---|
filter |
string |
No description. |
indent |
string |
No description. |
source |
string[] |
No description. |
specs |
string |
No description. |
types |
string |
No description. |
configPath |
string |
No description. |
filter
Required
public readonly filter: string;
- Type: string
indent
Required
public readonly indent: string;
- Type: string
source
Required
public readonly source: string[];
- Type: string[]
specs
Required
public readonly specs: string;
- Type: string
types
Required
public readonly types: string;
- Type: string
configPath
Optional
public readonly configPath: string;
- Type: string
JavaProjectOptions
JavaProjectOptions.
Initializer
import { JavaProjectOptions } from '@aws/pdk/monorepo'
const javaProjectOptions: JavaProjectOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
name |
string |
No description. |
artifactId |
string |
The artifactId is generally the name that the project is known by. |
autoApproveOptions |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
boolean |
Whether to commit the managed files by default. |
compileOptions |
projen.java.MavenCompileOptions |
Compile options. |
deps |
string[] |
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver> . |
description |
string |
Description of a project is always good. |
devContainer |
boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
distdir |
string |
Final artifact output directory. |
github |
boolean |
Enable GitHub integration. |
githubOptions |
projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
projen.GitOptions |
Configuration options for git. |
gitpod |
boolean |
Add a Gitpod development environment. |
groupId |
string |
This is generally unique amongst an organization or a project. |
junit |
boolean |
Include junit tests. |
junitOptions |
projen.java.JunitOptions |
junit options. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
projen.github.MergifyOptions |
Options for mergify. |
outdir |
string |
The root directory of the project. Relative to this directory, all files are synthesized. |
packaging |
string |
Project packaging format. |
packagingOptions |
projen.java.MavenPackagingOptions |
Packaging options. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
parentPom |
projen.java.ParentPom |
A Parent Pom can be used to have a child project inherit properties/plugins/ect in order to reduce duplication and keep standards across a large amount of repos. |
projectType |
projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
string |
The shell command to use in order to run the projen CLI. |
projenCredentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJava |
boolean |
Use projenrc in java. |
projenrcJavaOptions |
projen.java.ProjenrcOptions |
Options related to projenrc in java. |
projenrcJson |
boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenTokenSecret |
string |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
projen.SampleReadmeProps |
The README setup. |
renovatebot |
boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
projen.RenovatebotOptions |
Options for renovatebot. |
sample |
boolean |
Include sample code and test if the relevant directories don't exist. |
sampleJavaPackage |
string |
The java package to use for the code sample. |
stale |
boolean |
Auto-close of stale issues and pull request. |
staleOptions |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testDeps |
string[] |
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver> . |
url |
string |
The URL, like the name, is not required. |
version |
string |
This is the last piece of the naming puzzle. |
vscode |
boolean |
Enable VSCode integration. |
name
Required
public readonly name: string;
- Type: string
- Default: $BASEDIR
artifactId
Optional
public readonly artifactId: string;
- Type: string
- Default: "my-app"
The artifactId is generally the name that the project is known by.
Although the groupId is important, people within the group will rarely mention the groupId in discussion (they are often all be the same ID, such as the MojoHaus project groupId: org.codehaus.mojo). It, along with the groupId, creates a key that separates this project from every other project in the world (at least, it should :) ). Along with the groupId, the artifactId fully defines the artifact's living quarters within the repository. In the case of the above project, my-project lives in $M2_REPO/org/codehaus/mojo/my-project.
autoApproveOptions
Optional
public readonly autoApproveOptions: AutoApproveOptions;
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
public readonly autoMerge: boolean;
- Type: boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptions
Optional
public readonly autoMergeOptions: AutoMergeOptions;
- Type: projen.github.AutoMergeOptions
- Default: see defaults in
AutoMergeOptions
Configure options for automatic merging on GitHub.
Has no effect if
github.mergify
or autoMerge
is set to false.
clobber
Optional
public readonly clobber: boolean;
- Type: boolean
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
commitGenerated
Optional
public readonly commitGenerated: boolean;
- Type: boolean
- Default: true
Whether to commit the managed files by default.
compileOptions
Optional
public readonly compileOptions: MavenCompileOptions;
- Type: projen.java.MavenCompileOptions
- Default: defaults
Compile options.
deps
Optional
public readonly deps: string[];
- Type: string[]
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>
.
Additional dependencies can be added via project.addDependency()
.
description
Optional
public readonly description: string;
- Type: string
- Default: undefined
Description of a project is always good.
Although this should not replace formal documentation, a quick comment to any readers of the POM is always helpful.
devContainer
Optional
public readonly devContainer: boolean;
- Type: boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdir
Optional
public readonly distdir: string;
- Type: string
- Default: "dist/java"
Final artifact output directory.
github
Optional
public readonly github: boolean;
- Type: boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptions
Optional
public readonly githubOptions: GitHubOptions;
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public readonly gitIgnoreOptions: IgnoreFileOptions;
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public readonly gitOptions: GitOptions;
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
public readonly gitpod: boolean;
- Type: boolean
- Default: false
Add a Gitpod development environment.
groupId
Optional
public readonly groupId: string;
- Type: string
- Default: "org.acme"
This is generally unique amongst an organization or a project.
For example, all core Maven artifacts do (well, should) live under the groupId org.apache.maven. Group ID's do not necessarily use the dot notation, for example, the junit project. Note that the dot-notated groupId does not have to correspond to the package structure that the project contains. It is, however, a good practice to follow. When stored within a repository, the group acts much like the Java packaging structure does in an operating system. The dots are replaced by OS specific directory separators (such as '/' in Unix) which becomes a relative directory structure from the base repository. In the example given, the org.codehaus.mojo group lives within the directory $M2_REPO/org/codehaus/mojo.
junit
Optional
public readonly junit: boolean;
- Type: boolean
- Default: true
Include junit tests.
junitOptions
Optional
public readonly junitOptions: JunitOptions;
- Type: projen.java.JunitOptions
- Default: defaults
junit options.
logging
Optional
public readonly logging: LoggerOptions;
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
public readonly mergify: boolean;
- Type: boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
public readonly mergifyOptions: MergifyOptions;
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
outdir
Optional
public readonly outdir: string;
- Type: string
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packaging
Optional
public readonly packaging: string;
- Type: string
- Default: "jar"
Project packaging format.
packagingOptions
Optional
public readonly packagingOptions: MavenPackagingOptions;
- Type: projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parent
Optional
public readonly parent: Project;
- Type: projen.Project
The parent project, if this project is part of a bigger project.
parentPom
Optional
public readonly parentPom: ParentPom;
- Type: projen.java.ParentPom
- Default: undefined
A Parent Pom can be used to have a child project inherit properties/plugins/ect in order to reduce duplication and keep standards across a large amount of repos.
~~projectType
~~Optional
- Deprecated: no longer supported at the base project level
public readonly projectType: ProjectType;
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommand
Optional
public readonly projenCommand: string;
- Type: string
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentials
Optional
public readonly projenCredentials: GithubCredentials;
- Type: projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJava
Optional
public readonly projenrcJava: boolean;
- Type: boolean
- Default: true
Use projenrc in java.
This will install projen
as a java dependency and will add a synth
task which
will compile & execute main()
from src/main/java/projenrc.java
.
projenrcJavaOptions
Optional
public readonly projenrcJavaOptions: ProjenrcOptions;
- Type: projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrcJson
Optional
public readonly projenrcJson: boolean;
- Type: boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
~~projenTokenSecret
~~Optional
- Deprecated: use
projenCredentials
public readonly projenTokenSecret: string;
- Type: string
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo
, workflows
and packages
scope.
readme
Optional
public readonly readme: SampleReadmeProps;
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public readonly renovatebot: boolean;
- Type: boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public readonly renovatebotOptions: RenovatebotOptions;
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public readonly sample: boolean;
- Type: boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
sampleJavaPackage
Optional
public readonly sampleJavaPackage: string;
- Type: string
- Default: "org.acme"
The java package to use for the code sample.
stale
Optional
public readonly stale: boolean;
- Type: boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
public readonly staleOptions: StaleOptions;
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
testDeps
Optional
public readonly testDeps: string[];
- Type: string[]
- Default: []
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>
.
Additional dependencies can be added via project.addTestDependency()
.
url
Optional
public readonly url: string;
- Type: string
- Default: undefined
The URL, like the name, is not required.
This is a nice gesture for projects users, however, so that they know where the project lives.
version
Optional
public readonly version: string;
- Type: string
- Default: "0.1.0"
This is the last piece of the naming puzzle.
groupId:artifactId denotes a single project but they cannot delineate which incarnation of that project we are talking about. Do we want the junit:junit of 2018 (version 4.12), or of 2007 (version 3.8.2)? In short: code changes, those changes should be versioned, and this element keeps those versions in line. It is also used within an artifact's repository to separate versions from each other. my-project version 1.0 files live in the directory structure $M2_REPO/org/codehaus/mojo/my-project/1.0.
vscode
Optional
public readonly vscode: boolean;
- Type: boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
LicenseOptions
License options.
Initializer
import { LicenseOptions } from '@aws/pdk/monorepo'
const licenseOptions: LicenseOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
copyrightOwner |
string |
Copyright owner. |
disableDefaultLicenses |
boolean |
Whether to disable the generation of default licenses. |
licenseText |
string |
Arbitrary license text. |
spdx |
string |
License type (SPDX). |
copyrightOwner
Optional
public readonly copyrightOwner: string;
- Type: string
Copyright owner.
If the license text for the given spdx has $copyright_owner, this option must be specified.
disableDefaultLicenses
Optional
public readonly disableDefaultLicenses: boolean;
- Type: boolean
- Default: false
Whether to disable the generation of default licenses.
licenseText
Optional
public readonly licenseText: string;
- Type: string
Arbitrary license text.
spdx
Optional
public readonly spdx: string;
- Type: string
License type (SPDX).
https://github.com/projen/projen/tree/main/license-text for list of supported licenses
MonorepoJavaOptions
Configuration options for the NxMonorepoJavaProject.
Initializer
import { MonorepoJavaOptions } from '@aws/pdk/monorepo'
const monorepoJavaOptions: MonorepoJavaOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
name |
string |
No description. |
artifactId |
string |
The artifactId is generally the name that the project is known by. |
autoApproveOptions |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
clobber |
boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
boolean |
Whether to commit the managed files by default. |
compileOptions |
projen.java.MavenCompileOptions |
Compile options. |
deps |
string[] |
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver> . |
description |
string |
Description of a project is always good. |
devContainer |
boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
distdir |
string |
Final artifact output directory. |
github |
boolean |
Enable GitHub integration. |
githubOptions |
projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
projen.GitOptions |
Configuration options for git. |
gitpod |
boolean |
Add a Gitpod development environment. |
groupId |
string |
This is generally unique amongst an organization or a project. |
junit |
boolean |
Include junit tests. |
junitOptions |
projen.java.JunitOptions |
junit options. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
projen.github.MergifyOptions |
Options for mergify. |
outdir |
string |
The root directory of the project. Relative to this directory, all files are synthesized. |
packaging |
string |
Project packaging format. |
packagingOptions |
projen.java.MavenPackagingOptions |
Packaging options. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
parentPom |
projen.java.ParentPom |
A Parent Pom can be used to have a child project inherit properties/plugins/ect in order to reduce duplication and keep standards across a large amount of repos. |
projectType |
projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
string |
The shell command to use in order to run the projen CLI. |
projenCredentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJava |
boolean |
Use projenrc in java. |
projenrcJavaOptions |
projen.java.ProjenrcOptions |
Options related to projenrc in java. |
projenrcJson |
boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenTokenSecret |
string |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
readme |
projen.SampleReadmeProps |
The README setup. |
renovatebot |
boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
projen.RenovatebotOptions |
Options for renovatebot. |
sample |
boolean |
Include sample code and test if the relevant directories don't exist. |
sampleJavaPackage |
string |
The java package to use for the code sample. |
stale |
boolean |
Auto-close of stale issues and pull request. |
staleOptions |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testDeps |
string[] |
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver> . |
url |
string |
The URL, like the name, is not required. |
version |
string |
This is the last piece of the naming puzzle. |
vscode |
boolean |
Enable VSCode integration. |
defaultReleaseBranch |
string |
No description. |
disableDefaultLicenses |
boolean |
Whether to disable the generation of default licenses. |
name
Required
public readonly name: string;
- Type: string
- Default: $BASEDIR
artifactId
Optional
public readonly artifactId: string;
- Type: string
- Default: "my-app"
The artifactId is generally the name that the project is known by.
Although the groupId is important, people within the group will rarely mention the groupId in discussion (they are often all be the same ID, such as the MojoHaus project groupId: org.codehaus.mojo). It, along with the groupId, creates a key that separates this project from every other project in the world (at least, it should :) ). Along with the groupId, the artifactId fully defines the artifact's living quarters within the repository. In the case of the above project, my-project lives in $M2_REPO/org/codehaus/mojo/my-project.
autoApproveOptions
Optional
public readonly autoApproveOptions: AutoApproveOptions;
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
public readonly autoMerge: boolean;
- Type: boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptions
Optional
public readonly autoMergeOptions: AutoMergeOptions;
- Type: projen.github.AutoMergeOptions
- Default: see defaults in
AutoMergeOptions
Configure options for automatic merging on GitHub.
Has no effect if
github.mergify
or autoMerge
is set to false.
clobber
Optional
public readonly clobber: boolean;
- Type: boolean
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
commitGenerated
Optional
public readonly commitGenerated: boolean;
- Type: boolean
- Default: true
Whether to commit the managed files by default.
compileOptions
Optional
public readonly compileOptions: MavenCompileOptions;
- Type: projen.java.MavenCompileOptions
- Default: defaults
Compile options.
deps
Optional
public readonly deps: string[];
- Type: string[]
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>
.
Additional dependencies can be added via project.addDependency()
.
description
Optional
public readonly description: string;
- Type: string
- Default: undefined
Description of a project is always good.
Although this should not replace formal documentation, a quick comment to any readers of the POM is always helpful.
devContainer
Optional
public readonly devContainer: boolean;
- Type: boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
distdir
Optional
public readonly distdir: string;
- Type: string
- Default: "dist/java"
Final artifact output directory.
github
Optional
public readonly github: boolean;
- Type: boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptions
Optional
public readonly githubOptions: GitHubOptions;
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public readonly gitIgnoreOptions: IgnoreFileOptions;
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public readonly gitOptions: GitOptions;
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
public readonly gitpod: boolean;
- Type: boolean
- Default: false
Add a Gitpod development environment.
groupId
Optional
public readonly groupId: string;
- Type: string
- Default: "org.acme"
This is generally unique amongst an organization or a project.
For example, all core Maven artifacts do (well, should) live under the groupId org.apache.maven. Group ID's do not necessarily use the dot notation, for example, the junit project. Note that the dot-notated groupId does not have to correspond to the package structure that the project contains. It is, however, a good practice to follow. When stored within a repository, the group acts much like the Java packaging structure does in an operating system. The dots are replaced by OS specific directory separators (such as '/' in Unix) which becomes a relative directory structure from the base repository. In the example given, the org.codehaus.mojo group lives within the directory $M2_REPO/org/codehaus/mojo.
junit
Optional
public readonly junit: boolean;
- Type: boolean
- Default: true
Include junit tests.
junitOptions
Optional
public readonly junitOptions: JunitOptions;
- Type: projen.java.JunitOptions
- Default: defaults
junit options.
logging
Optional
public readonly logging: LoggerOptions;
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
public readonly mergify: boolean;
- Type: boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
public readonly mergifyOptions: MergifyOptions;
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
outdir
Optional
public readonly outdir: string;
- Type: string
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packaging
Optional
public readonly packaging: string;
- Type: string
- Default: "jar"
Project packaging format.
packagingOptions
Optional
public readonly packagingOptions: MavenPackagingOptions;
- Type: projen.java.MavenPackagingOptions
- Default: defaults
Packaging options.
parent
Optional
public readonly parent: Project;
- Type: projen.Project
The parent project, if this project is part of a bigger project.
parentPom
Optional
public readonly parentPom: ParentPom;
- Type: projen.java.ParentPom
- Default: undefined
A Parent Pom can be used to have a child project inherit properties/plugins/ect in order to reduce duplication and keep standards across a large amount of repos.
~~projectType
~~Optional
- Deprecated: no longer supported at the base project level
public readonly projectType: ProjectType;
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommand
Optional
public readonly projenCommand: string;
- Type: string
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentials
Optional
public readonly projenCredentials: GithubCredentials;
- Type: projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJava
Optional
public readonly projenrcJava: boolean;
- Type: boolean
- Default: true
Use projenrc in java.
This will install projen
as a java dependency and will add a synth
task which
will compile & execute main()
from src/main/java/projenrc.java
.
projenrcJavaOptions
Optional
public readonly projenrcJavaOptions: ProjenrcOptions;
- Type: projen.java.ProjenrcOptions
- Default: default options
Options related to projenrc in java.
projenrcJson
Optional
public readonly projenrcJson: boolean;
- Type: boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
~~projenTokenSecret
~~Optional
- Deprecated: use
projenCredentials
public readonly projenTokenSecret: string;
- Type: string
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo
, workflows
and packages
scope.
readme
Optional
public readonly readme: SampleReadmeProps;
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public readonly renovatebot: boolean;
- Type: boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public readonly renovatebotOptions: RenovatebotOptions;
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public readonly sample: boolean;
- Type: boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
sampleJavaPackage
Optional
public readonly sampleJavaPackage: string;
- Type: string
- Default: "org.acme"
The java package to use for the code sample.
stale
Optional
public readonly stale: boolean;
- Type: boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
public readonly staleOptions: StaleOptions;
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
testDeps
Optional
public readonly testDeps: string[];
- Type: string[]
- Default: []
List of test dependencies for this project. Dependencies use the format: <groupId>/<artifactId>@<semver>
.
Additional dependencies can be added via project.addTestDependency()
.
url
Optional
public readonly url: string;
- Type: string
- Default: undefined
The URL, like the name, is not required.
This is a nice gesture for projects users, however, so that they know where the project lives.
version
Optional
public readonly version: string;
- Type: string
- Default: "0.1.0"
This is the last piece of the naming puzzle.
groupId:artifactId denotes a single project but they cannot delineate which incarnation of that project we are talking about. Do we want the junit:junit of 2018 (version 4.12), or of 2007 (version 3.8.2)? In short: code changes, those changes should be versioned, and this element keeps those versions in line. It is also used within an artifact's repository to separate versions from each other. my-project version 1.0 files live in the directory structure $M2_REPO/org/codehaus/mojo/my-project/1.0.
vscode
Optional
public readonly vscode: boolean;
- Type: boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
defaultReleaseBranch
Optional
public readonly defaultReleaseBranch: string;
- Type: string
disableDefaultLicenses
Optional
public readonly disableDefaultLicenses: boolean;
- Type: boolean
- Default: false
Whether to disable the generation of default licenses.
MonorepoPythonProjectOptions
Configuration options for the NxMonorepoPythonProject.
Initializer
import { MonorepoPythonProjectOptions } from '@aws/pdk/monorepo'
const monorepoPythonProjectOptions: MonorepoPythonProjectOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
moduleName |
string |
No description. |
name |
string |
No description. |
authorEmail |
string |
Author's e-mail. |
authorName |
string |
Author's name. |
autoApproveOptions |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
classifiers |
string[] |
A list of PyPI trove classifiers that describe the project. |
clobber |
boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
boolean |
Whether to commit the managed files by default. |
deps |
string[] |
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver> . |
description |
string |
A short description of the package. |
devContainer |
boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
string[] |
List of dev dependencies for this project. Dependencies use the format: <module>@<semver> . |
github |
boolean |
Enable GitHub integration. |
githubOptions |
projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
projen.GitOptions |
Configuration options for git. |
gitpod |
boolean |
Add a Gitpod development environment. |
homepage |
string |
A URL to the website of the project. |
license |
string |
License of this package as an SPDX identifier. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
projen.github.MergifyOptions |
Options for mergify. |
outdir |
string |
The root directory of the project. Relative to this directory, all files are synthesized. |
packageName |
string |
Package name. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
poetryOptions |
projen.python.PoetryPyprojectOptionsWithoutDeps |
Additional options to set for poetry if using poetry. |
projectType |
projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
string |
The shell command to use in order to run the projen CLI. |
projenCredentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJson |
boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcPythonOptions |
projen.python.ProjenrcOptions |
Options related to projenrc in python. |
projenTokenSecret |
string |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
pytest |
boolean |
Include pytest tests. |
pytestOptions |
projen.python.PytestOptions |
pytest options. |
pythonExec |
string |
Path to the python executable to use. |
readme |
projen.SampleReadmeProps |
The README setup. |
renovatebot |
boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
projen.RenovatebotOptions |
Options for renovatebot. |
sample |
boolean |
Include sample code and test if the relevant directories don't exist. |
setupConfig |
{[ key: string ]: any} |
Additional fields to pass in the setup() function if using setuptools. |
setuptools |
boolean |
Use setuptools with a setup.py script for packaging and publishing. |
stale |
boolean |
Auto-close of stale issues and pull request. |
staleOptions |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
version |
string |
Version of the package. |
vscode |
boolean |
Enable VSCode integration. |
defaultReleaseBranch |
string |
No description. |
licenseOptions |
LicenseOptions |
Default license to apply to all PDK managed packages. |
moduleName
Required
public readonly moduleName: string;
- Type: string
- Default: $PYTHON_MODULE_NAME
name
Required
public readonly name: string;
- Type: string
- Default: $BASEDIR
authorEmail
Optional
public readonly authorEmail: string;
- Type: string
- Default: $GIT_USER_EMAIL
Author's e-mail.
authorName
Optional
public readonly authorName: string;
- Type: string
- Default: $GIT_USER_NAME
Author's name.
autoApproveOptions
Optional
public readonly autoApproveOptions: AutoApproveOptions;
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
public readonly autoMerge: boolean;
- Type: boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptions
Optional
public readonly autoMergeOptions: AutoMergeOptions;
- Type: projen.github.AutoMergeOptions
- Default: see defaults in
AutoMergeOptions
Configure options for automatic merging on GitHub.
Has no effect if
github.mergify
or autoMerge
is set to false.
classifiers
Optional
public readonly classifiers: string[];
- Type: string[]
A list of PyPI trove classifiers that describe the project.
clobber
Optional
public readonly clobber: boolean;
- Type: boolean
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
commitGenerated
Optional
public readonly commitGenerated: boolean;
- Type: boolean
- Default: true
Whether to commit the managed files by default.
deps
Optional
public readonly deps: string[];
- Type: string[]
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>
.
Additional dependencies can be added via project.addDependency()
.
description
Optional
public readonly description: string;
- Type: string
A short description of the package.
devContainer
Optional
public readonly devContainer: boolean;
- Type: boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
public readonly devDeps: string[];
- Type: string[]
- Default: []
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>
.
Additional dependencies can be added via project.addDevDependency()
.
github
Optional
public readonly github: boolean;
- Type: boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptions
Optional
public readonly githubOptions: GitHubOptions;
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public readonly gitIgnoreOptions: IgnoreFileOptions;
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public readonly gitOptions: GitOptions;
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
public readonly gitpod: boolean;
- Type: boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public readonly homepage: string;
- Type: string
A URL to the website of the project.
license
Optional
public readonly license: string;
- Type: string
License of this package as an SPDX identifier.
logging
Optional
public readonly logging: LoggerOptions;
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
public readonly mergify: boolean;
- Type: boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
public readonly mergifyOptions: MergifyOptions;
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
outdir
Optional
public readonly outdir: string;
- Type: string
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageName
Optional
public readonly packageName: string;
- Type: string
Package name.
parent
Optional
public readonly parent: Project;
- Type: projen.Project
The parent project, if this project is part of a bigger project.
poetryOptions
Optional
public readonly poetryOptions: PoetryPyprojectOptionsWithoutDeps;
- Type: projen.python.PoetryPyprojectOptionsWithoutDeps
Additional options to set for poetry if using poetry.
~~projectType
~~Optional
- Deprecated: no longer supported at the base project level
public readonly projectType: ProjectType;
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommand
Optional
public readonly projenCommand: string;
- Type: string
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentials
Optional
public readonly projenCredentials: GithubCredentials;
- Type: projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJson
Optional
public readonly projenrcJson: boolean;
- Type: boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcPythonOptions
Optional
public readonly projenrcPythonOptions: ProjenrcOptions;
- Type: projen.python.ProjenrcOptions
- Default: default options
Options related to projenrc in python.
~~projenTokenSecret
~~Optional
- Deprecated: use
projenCredentials
public readonly projenTokenSecret: string;
- Type: string
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo
, workflows
and packages
scope.
pytest
Optional
public readonly pytest: boolean;
- Type: boolean
- Default: true
Include pytest tests.
pytestOptions
Optional
public readonly pytestOptions: PytestOptions;
- Type: projen.python.PytestOptions
- Default: defaults
pytest options.
pythonExec
Optional
public readonly pythonExec: string;
- Type: string
- Default: "python"
Path to the python executable to use.
readme
Optional
public readonly readme: SampleReadmeProps;
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public readonly renovatebot: boolean;
- Type: boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public readonly renovatebotOptions: RenovatebotOptions;
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public readonly sample: boolean;
- Type: boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
setupConfig
Optional
public readonly setupConfig: {[ key: string ]: any};
- Type: {[ key: string ]: any}
Additional fields to pass in the setup() function if using setuptools.
setuptools
Optional
public readonly setuptools: boolean;
- Type: boolean
- Default: true, unless poetry is true, then false
Use setuptools with a setup.py script for packaging and publishing.
stale
Optional
public readonly stale: boolean;
- Type: boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
public readonly staleOptions: StaleOptions;
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
version
Optional
public readonly version: string;
- Type: string
- Default: "0.1.0"
Version of the package.
vscode
Optional
public readonly vscode: boolean;
- Type: boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
defaultReleaseBranch
Optional
public readonly defaultReleaseBranch: string;
- Type: string
licenseOptions
Optional
public readonly licenseOptions: LicenseOptions;
- Type: LicenseOptions
- Default: Apache-2.0
Default license to apply to all PDK managed packages.
MonorepoTsProjectOptions
Configuration options for the MonorepoTsProject.
Initializer
import { MonorepoTsProjectOptions } from '@aws/pdk/monorepo'
const monorepoTsProjectOptions: MonorepoTsProjectOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
name |
string |
No description. |
allowLibraryDependencies |
boolean |
Allow the project to include peerDependencies and bundledDependencies . |
artifactsDirectory |
string |
A directory which will contain build artifacts. |
authorEmail |
string |
Author's e-mail. |
authorName |
string |
Author's name. |
authorOrganization |
boolean |
Is the author an organization. |
authorUrl |
string |
Author's URL / Website. |
autoApproveOptions |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoApproveUpgrades |
boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
autoDetectBin |
boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
autoMerge |
boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
{[ key: string ]: string} |
Binary programs vended with your module. |
bugsEmail |
string |
The email address to which issues should be reported. |
bugsUrl |
string |
The url to your project's issue tracker. |
buildWorkflow |
boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
projen.github.workflows.Triggers |
Build workflow triggers. |
bundledDeps |
string[] |
List of dependencies to bundle into this module. |
bundlerOptions |
projen.javascript.BundlerOptions |
Options for Bundler . |
checkLicenses |
projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
boolean |
Add a clobber task which resets the repo to origin. |
codeArtifactOptions |
projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
codeCov |
boolean |
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with @codeCovTokenSecret . |
codeCovTokenSecret |
string |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commitGenerated |
boolean |
Whether to commit the managed files by default. |
copyrightOwner |
string |
License copyright owner. |
copyrightPeriod |
string |
The copyright years to put in the LICENSE file. |
defaultReleaseBranch |
string |
The name of the main release branch. |
dependabot |
boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
projen.github.DependabotOptions |
Options for dependabot. |
deps |
string[] |
Runtime dependencies of this module. |
depsUpgrade |
boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies . |
description |
string |
The description is just a string that helps people understand the purpose of the package. |
devContainer |
boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
string[] |
Build dependencies for this module. |
disableTsconfig |
boolean |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disableTsconfigDev |
boolean |
Do not generate a tsconfig.dev.json file. |
docgen |
boolean |
Docgen by Typedoc. |
docsDirectory |
string |
Docs directory. |
entrypoint |
string |
Module entrypoint (main in package.json ). Set to an empty string to not include main in your package.json. |
entrypointTypes |
string |
The .d.ts file that includes the type declarations for this module. |
eslint |
boolean |
Setup eslint. |
eslintOptions |
projen.javascript.EslintOptions |
Eslint options. |
github |
boolean |
Enable GitHub integration. |
githubOptions |
projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
string[] |
Additional entries to .gitignore. |
gitIgnoreOptions |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
projen.GitOptions |
Configuration options for git. |
gitpod |
boolean |
Add a Gitpod development environment. |
homepage |
string |
Package's Homepage / Website. |
jest |
boolean |
Setup jest unit tests. |
jestOptions |
projen.javascript.JestOptions |
Jest options. |
jsiiReleaseVersion |
string |
Version requirement of publib which is used to publish modules to npm. |
keywords |
string[] |
Keywords to include in package.json . |
libdir |
string |
Typescript artifacts output directory. |
license |
string |
License's SPDX identifier. |
licensed |
boolean |
Indicates if a license should be added. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
majorVersion |
number |
Major version to release from the default branch. |
maxNodeVersion |
string |
Minimum node.js version to require via engines (inclusive). |
mergify |
boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
projen.github.MergifyOptions |
Options for mergify. |
minMajorVersion |
number |
Minimal Major version to release. |
minNodeVersion |
string |
Minimum Node.js version to require via package.json engines (inclusive). |
mutableBuild |
boolean |
Automatically update files modified during builds to pull-request branches. |
npmAccess |
projen.javascript.NpmAccess |
Access level of the npm package. |
npmDistTag |
string |
The npmDistTag to use when publishing from the default branch. |
npmignore |
string[] |
Additional entries to .npmignore. |
npmignoreEnabled |
boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npmProvenance |
boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
string |
The host name of the npm registry to publish to. |
npmRegistryUrl |
string |
The base URL of the npm package registry. |
npmTokenSecret |
string |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
string |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist ). |
packageManager |
projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
string |
The "name" in package.json. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
peerDependencyOptions |
projen.javascript.PeerDependencyOptions |
Options for peerDeps . |
peerDeps |
string[] |
Peer dependencies for this module. |
pnpmVersion |
string |
The version of PNPM to use if using PNPM as a package manager. |
postBuildSteps |
projen.github.workflows.JobStep[] |
Steps to execute after build as part of the release workflow. |
prerelease |
string |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
boolean |
Setup prettier. |
prettierOptions |
projen.javascript.PrettierOptions |
Prettier options. |
projectType |
projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
string |
The shell command to use in order to run the projen CLI. |
projenCredentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenDevDependency |
boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJson |
boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcJsOptions |
projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrcTs |
boolean |
Use TypeScript for your projenrc file (.projenrc.ts ). |
projenrcTsOptions |
projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projenTokenSecret |
string |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projenVersion |
string |
Version of projen to install. |
publishDryRun |
boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
boolean |
Define publishing tasks that can be executed manually as well as workflows. |
pullRequestTemplate |
boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
string[] |
The contents of the pull request template. |
readme |
projen.SampleReadmeProps |
The README setup. |
releasableCommits |
projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
boolean |
Add release management to this project. |
releaseBranches |
{[ key: string ]: projen.release.BranchOptions} |
Defines additional release branches. |
releaseEveryCommit |
boolean |
Automatically release new versions every commit to one of branches in releaseBranches . |
releaseFailureIssue |
boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
string |
The label to apply to issues indicating publish failures. |
releaseSchedule |
string |
CRON schedule to trigger new releases. |
releaseTagPrefix |
string |
Automatically add the given prefix to release tags. |
releaseToNpm |
boolean |
Automatically release to npm when new versions are introduced. |
releaseTrigger |
projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflow |
boolean |
DEPRECATED: renamed to release . |
releaseWorkflowName |
string |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
projen.github.workflows.JobStep[] |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
projen.RenovatebotOptions |
Options for renovatebot. |
repository |
string |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
string |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
sampleCode |
boolean |
Generate one-time sample in src/ and test/ if there are no files there. |
scopedPackagesOptions |
projen.javascript.ScopedPackagesOptions[] |
Options for privately hosted scoped packages. |
scripts |
{[ key: string ]: string} |
npm scripts to include. |
srcdir |
string |
Typescript sources directory. |
stability |
string |
Package's Stability. |
stale |
boolean |
Auto-close of stale issues and pull request. |
staleOptions |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
string |
Jest tests directory. |
tsconfig |
projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfigDev |
projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfigDevFile |
string |
The name of the development tsconfig.json file. |
tsJestOptions |
projen.typescript.TsJestOptions |
Options for ts-jest. |
typescriptVersion |
string |
TypeScript version to use. |
versionrcOptions |
{[ key: string ]: any} |
Custom configuration used when creating changelog with standard-version package. |
vscode |
boolean |
Enable VSCode integration. |
workflowBootstrapSteps |
projen.github.workflows.JobStep[] |
Workflow steps to use in order to bootstrap this repo. |
workflowContainerImage |
string |
Container image to use for GitHub workflows. |
workflowGitIdentity |
projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
string |
The node version to use in GitHub workflows. |
workflowPackageCache |
boolean |
Enable Node.js package cache in GitHub workflows. |
workflowRunsOn |
string[] |
Github Runner selection labels. |
workflowRunsOnGroup |
projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarnBerryOptions |
projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
disableNodeWarnings |
boolean |
Disable node warnings from being emitted during build tasks. |
licenseOptions |
LicenseOptions |
Default license to apply to all PDK managed packages. |
monorepoUpgradeDeps |
boolean |
Whether to include an upgrade-deps task at the root of the monorepo which will upgrade all dependencies. |
monorepoUpgradeDepsOptions |
MonorepoUpgradeDepsOptions |
Monorepo Upgrade Deps options. |
workspaceConfig |
WorkspaceConfig |
Configuration for workspace. |
name
Required
public readonly name: string;
- Type: string
- Default: $BASEDIR
allowLibraryDependencies
Optional
public readonly allowLibraryDependencies: boolean;
- Type: boolean
- Default: true
Allow the project to include peerDependencies
and bundledDependencies
.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
artifactsDirectory
Optional
public readonly artifactsDirectory: string;
- Type: string
- Default: "dist"
A directory which will contain build artifacts.
authorEmail
Optional
public readonly authorEmail: string;
- Type: string
Author's e-mail.
authorName
Optional
public readonly authorName: string;
- Type: string
Author's name.
authorOrganization
Optional
public readonly authorOrganization: boolean;
- Type: boolean
Is the author an organization.
authorUrl
Optional
public readonly authorUrl: string;
- Type: string
Author's URL / Website.
autoApproveOptions
Optional
public readonly autoApproveOptions: AutoApproveOptions;
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgrades
Optional
public readonly autoApproveUpgrades: boolean;
- Type: boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions
are not defined.
autoDetectBin
Optional
public readonly autoDetectBin: boolean;
- Type: boolean
- Default: true
Automatically add all executables under the bin
directory to your package.json
file under the bin
section.
autoMerge
Optional
public readonly autoMerge: boolean;
- Type: boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptions
Optional
public readonly autoMergeOptions: AutoMergeOptions;
- Type: projen.github.AutoMergeOptions
- Default: see defaults in
AutoMergeOptions
Configure options for automatic merging on GitHub.
Has no effect if
github.mergify
or autoMerge
is set to false.
bin
Optional
public readonly bin: {[ key: string ]: string};
- Type: {[ key: string ]: string}
Binary programs vended with your module.
You can use this option to add/customize how binaries are represented in
your package.json
, but unless autoDetectBin
is false
, every
executable file under bin
will automatically be added to this section.
bugsEmail
Optional
public readonly bugsEmail: string;
- Type: string
The email address to which issues should be reported.
bugsUrl
Optional
public readonly bugsUrl: string;
- Type: string
The url to your project's issue tracker.
buildWorkflow
Optional
public readonly buildWorkflow: boolean;
- Type: boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
public readonly buildWorkflowOptions: BuildWorkflowOptions;
- Type: projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers
~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public readonly buildWorkflowTriggers: Triggers;
- Type: projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundledDeps
Optional
public readonly bundledDeps: string[];
- Type: string[]
List of dependencies to bundle into this module.
These modules will be
added both to the dependencies
section and bundledDependencies
section of
your package.json
.
The recommendation is to only specify the module name here (e.g.
express
). This will behave similar to yarn add
or npm install
in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^
). You can specify semver requirements in
the same syntax passed to npm i
or yarn add
(e.g. express@^2
) and
this will be what you package.json
will eventually include.
bundlerOptions
Optional
public readonly bundlerOptions: BundlerOptions;
- Type: projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
public readonly checkLicenses: LicenseCheckerOptions;
- Type: projen.javascript.LicenseCheckerOptions
- Default: no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
clobber
Optional
public readonly clobber: boolean;
- Type: boolean
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
codeArtifactOptions
Optional
public readonly codeArtifactOptions: CodeArtifactOptions;
- Type: projen.javascript.CodeArtifactOptions
- Default: undefined
Options for npm packages using AWS CodeArtifact.
This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
codeCov
Optional
public readonly codeCov: boolean;
- Type: boolean
- Default: false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with @codeCovTokenSecret
.
codeCovTokenSecret
Optional
public readonly codeCovTokenSecret: string;
- Type: string
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
commitGenerated
Optional
public readonly commitGenerated: boolean;
- Type: boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwner
Optional
public readonly copyrightOwner: string;
- Type: string
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public readonly copyrightPeriod: string;
- Type: string
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranch
Optional
public readonly defaultReleaseBranch: string;
- Type: string
- Default: "main"
The name of the main release branch.
dependabot
Optional
public readonly dependabot: boolean;
- Type: boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public readonly dependabotOptions: DependabotOptions;
- Type: projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
public readonly deps: string[];
- Type: string[]
- Default: []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
express
). This will behave similar to yarn add
or npm install
in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^
). You can specify semver requirements in
the same syntax passed to npm i
or yarn add
(e.g. express@^2
) and
this will be what you package.json
will eventually include.
depsUpgrade
Optional
public readonly depsUpgrade: boolean;
- Type: boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot
.
depsUpgradeOptions
Optional
public readonly depsUpgradeOptions: UpgradeDependenciesOptions;
- Type: projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
public readonly description: string;
- Type: string
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devContainer
Optional
public readonly devContainer: boolean;
- Type: boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
public readonly devDeps: string[];
- Type: string[]
- Default: []
Build dependencies for this module.
These dependencies will only be available in your build environment but will not be fetched when this module is consumed.
The recommendation is to only specify the module name here (e.g.
express
). This will behave similar to yarn add
or npm install
in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^
). You can specify semver requirements in
the same syntax passed to npm i
or yarn add
(e.g. express@^2
) and
this will be what you package.json
will eventually include.
disableTsconfig
Optional
public readonly disableTsconfig: boolean;
- Type: boolean
- Default: false
Do not generate a tsconfig.json
file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disableTsconfigDev
Optional
public readonly disableTsconfigDev: boolean;
- Type: boolean
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
public readonly docgen: boolean;
- Type: boolean
- Default: false
Docgen by Typedoc.
docsDirectory
Optional
public readonly docsDirectory: string;
- Type: string
- Default: "docs"
Docs directory.
entrypoint
Optional
public readonly entrypoint: string;
- Type: string
- Default: "lib/index.js"
Module entrypoint (main
in package.json
). Set to an empty string to not include main
in your package.json.
entrypointTypes
Optional
public readonly entrypointTypes: string;
- Type: string
- Default: .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
eslint
Optional
public readonly eslint: boolean;
- Type: boolean
- Default: true
Setup eslint.
eslintOptions
Optional
public readonly eslintOptions: EslintOptions;
- Type: projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
public readonly github: boolean;
- Type: boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptions
Optional
public readonly githubOptions: GitHubOptions;
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
public readonly gitignore: string[];
- Type: string[]
Additional entries to .gitignore.
gitIgnoreOptions
Optional
public readonly gitIgnoreOptions: IgnoreFileOptions;
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public readonly gitOptions: GitOptions;
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
public readonly gitpod: boolean;
- Type: boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public readonly homepage: string;
- Type: string
Package's Homepage / Website.
jest
Optional
public readonly jest: boolean;
- Type: boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
public readonly jestOptions: JestOptions;
- Type: projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersion
Optional
public readonly jsiiReleaseVersion: string;
- Type: string
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
public readonly keywords: string[];
- Type: string[]
Keywords to include in package.json
.
libdir
Optional
public readonly libdir: string;
- Type: string
- Default: "lib"
Typescript artifacts output directory.
license
Optional
public readonly license: string;
- Type: string
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed
option if you want to no license to be specified.
licensed
Optional
public readonly licensed: boolean;
- Type: boolean
- Default: true
Indicates if a license should be added.
logging
Optional
public readonly logging: LoggerOptions;
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersion
Optional
public readonly majorVersion: number;
- Type: number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
maxNodeVersion
Optional
public readonly maxNodeVersion: string;
- Type: string
- Default: no max
Minimum node.js version to require via engines
(inclusive).
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
public readonly mergify: boolean;
- Type: boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
public readonly mergifyOptions: MergifyOptions;
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersion
Optional
public readonly minMajorVersion: number;
- Type: number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion
.
minNodeVersion
Optional
public readonly minNodeVersion: string;
- Type: string
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines
(inclusive).
~~mutableBuild
~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public readonly mutableBuild: boolean;
- Type: boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
npmAccess
Optional
public readonly npmAccess: NpmAccess;
- Type: projen.javascript.NpmAccess
- Default: for scoped packages (e.g.
foo@bar
), the default isNpmAccess.RESTRICTED
, for non-scoped packages, the default isNpmAccess.PUBLIC
.
Access level of the npm package.
npmDistTag
Optional
public readonly npmDistTag: string;
- Type: string
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag
property
for each branch.
~~npmignore
~~Optional
- Deprecated: - use
project.addPackageIgnore
public readonly npmignore: string[];
- Type: string[]
Additional entries to .npmignore.
npmignoreEnabled
Optional
public readonly npmignoreEnabled: boolean;
- Type: boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptions
Optional
public readonly npmIgnoreOptions: IgnoreFileOptions;
- Type: projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenance
Optional
public readonly npmProvenance: boolean;
- Type: boolean
- Default: true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and you will need to use a supported CI/CD provider.
Note that the projen Release
and Publisher
components are using publib
to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
~~npmRegistry
~~Optional
- Deprecated: use
npmRegistryUrl
instead
public readonly npmRegistry: string;
- Type: string
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl
.
npmRegistryUrl
Optional
public readonly npmRegistryUrl: string;
- Type: string
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecret
Optional
public readonly npmTokenSecret: string;
- Type: string
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
public readonly outdir: string;
- Type: string
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
package
Optional
public readonly package: boolean;
- Type: boolean
- Default: true
Defines a package
task that will produce an npm tarball under the artifacts directory (e.g. dist
).
packageManager
Optional
public readonly packageManager: NodePackageManager;
- Type: projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public readonly packageName: string;
- Type: string
- Default: defaults to project name
The "name" in package.json.
parent
Optional
public readonly parent: Project;
- Type: projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptions
Optional
public readonly peerDependencyOptions: PeerDependencyOptions;
- Type: projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
public readonly peerDeps: string[];
- Type: string[]
- Default: []
Peer dependencies for this module.
Dependencies listed here are required to
be installed (and satisfied) by the consumer of this library. Using peer
dependencies allows you to ensure that only a single module of a certain
library exists in the node_modules
tree of your consumers.
Note that prior to npm@7, peer dependencies are not automatically installed, which means that adding peer dependencies to a library will be a breaking change for your customers.
Unless peerDependencyOptions.pinnedDevDependency
is disabled (it is
enabled by default), projen will automatically add a dev dependency with a
pinned version for each peer dependency. This will ensure that you build &
test your module against the lowest peer version required.
pnpmVersion
Optional
public readonly pnpmVersion: string;
- Type: string
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildSteps
Optional
public readonly postBuildSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
public readonly prerelease: string;
- Type: string
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettier
Optional
public readonly prettier: boolean;
- Type: boolean
- Default: false
Setup prettier.
prettierOptions
Optional
public readonly prettierOptions: PrettierOptions;
- Type: projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~projectType
~~Optional
- Deprecated: no longer supported at the base project level
public readonly projectType: ProjectType;
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommand
Optional
public readonly projenCommand: string;
- Type: string
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentials
Optional
public readonly projenCredentials: GithubCredentials;
- Type: projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenDevDependency
Optional
public readonly projenDevDependency: boolean;
- Type: boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
public readonly projenrcJs: boolean;
- Type: boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false
in order to disable .projenrc.js generation.
projenrcJson
Optional
public readonly projenrcJson: boolean;
- Type: boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptions
Optional
public readonly projenrcJsOptions: ProjenrcOptions;
- Type: projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTs
Optional
public readonly projenrcTs: boolean;
- Type: boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrcTsOptions
Optional
public readonly projenrcTsOptions: ProjenrcOptions;
- Type: projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projenTokenSecret
~~Optional
- Deprecated: use
projenCredentials
public readonly projenTokenSecret: string;
- Type: string
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo
, workflows
and packages
scope.
projenVersion
Optional
public readonly projenVersion: string;
- Type: string
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRun
Optional
public readonly publishDryRun: boolean;
- Type: boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
public readonly publishTasks: boolean;
- Type: boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
pullRequestTemplate
Optional
public readonly pullRequestTemplate: boolean;
- Type: boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public readonly pullRequestTemplateContents: string[];
- Type: string[]
- Default: default content
The contents of the pull request template.
readme
Optional
public readonly readme: SampleReadmeProps;
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommits
Optional
public readonly releasableCommits: ReleasableCommits;
- Type: projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
release
Optional
public readonly release: boolean;
- Type: boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranches
Optional
public readonly releaseBranches: {[ key: string ]: BranchOptions};
- Type: {[ key: string ]: projen.release.BranchOptions}
- Default: no additional branches are used for release. you can use
addBranch()
to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion
field must also
be provided for the default branch.
~~releaseEveryCommit
~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()
instead
public readonly releaseEveryCommit: boolean;
- Type: boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches
.
releaseFailureIssue
Optional
public readonly releaseFailureIssue: boolean;
- Type: boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
public readonly releaseFailureIssueLabel: string;
- Type: string
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue
is true.
~~releaseSchedule
~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()
instead
public readonly releaseSchedule: string;
- Type: string
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefix
Optional
public readonly releaseTagPrefix: string;
- Type: string
- Default: "v"
Automatically add the given prefix to release tags.
Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseToNpm
Optional
public readonly releaseToNpm: boolean;
- Type: boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTrigger
Optional
public readonly releaseTrigger: ReleaseTrigger;
- Type: projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous()
)
The release trigger to use.
~~releaseWorkflow
~~Optional
- Deprecated: see
release
.
public readonly releaseWorkflow: boolean;
- Type: boolean
- Default: true if not a subproject
DEPRECATED: renamed to release
.
releaseWorkflowName
Optional
public readonly releaseWorkflowName: string;
- Type: string
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public readonly releaseWorkflowSetupSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
public readonly renovatebot: boolean;
- Type: boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public readonly renovatebotOptions: RenovatebotOptions;
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
public readonly repository: string;
- Type: string
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectory
Optional
public readonly repositoryDirectory: string;
- Type: string
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
sampleCode
Optional
public readonly sampleCode: boolean;
- Type: boolean
- Default: true
Generate one-time sample in src/
and test/
if there are no files there.
scopedPackagesOptions
Optional
public readonly scopedPackagesOptions: ScopedPackagesOptions[];
- Type: projen.javascript.ScopedPackagesOptions[]
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts
~~Optional
- Deprecated: use
project.addTask()
orpackage.setScript()
public readonly scripts: {[ key: string ]: string};
- Type: {[ key: string ]: string}
- Default: {}
npm scripts to include.
If a script has the same name as a standard script, the standard script will be overwritten. Also adds the script as a task.
srcdir
Optional
public readonly srcdir: string;
- Type: string
- Default: "src"
Typescript sources directory.
stability
Optional
public readonly stability: string;
- Type: string
Package's Stability.
stale
Optional
public readonly stale: boolean;
- Type: boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
public readonly staleOptions: StaleOptions;
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
testdir
Optional
public readonly testdir: string;
- Type: string
- Default: "test"
Jest tests directory.
Tests files should be named xxx.test.ts
.
If this directory is under srcdir
(e.g. src/test
, src/__tests__
),
then tests are going to be compiled into lib/
and executed as javascript.
If the test directory is outside of src
, then we configure jest to
compile the code in-memory.
tsconfig
Optional
public readonly tsconfig: TypescriptConfigOptions;
- Type: projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDev
Optional
public readonly tsconfigDev: TypescriptConfigOptions;
- Type: projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfigDevFile
Optional
public readonly tsconfigDevFile: string;
- Type: string
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptions
Optional
public readonly tsJestOptions: TsJestOptions;
- Type: projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersion
Optional
public readonly typescriptVersion: string;
- Type: string
- Default: "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a ~
dependency (e.g. ~1.2.3
).
versionrcOptions
Optional
public readonly versionrcOptions: {[ key: string ]: any};
- Type: {[ key: string ]: any}
- Default: standard configuration applicable for GitHub repositories
Custom configuration used when creating changelog with standard-version package.
Given values either append to default configuration or overwrite values in it.
vscode
Optional
public readonly vscode: boolean;
- Type: boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflowBootstrapSteps
Optional
public readonly workflowBootstrapSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowContainerImage
Optional
public readonly workflowContainerImage: string;
- Type: string
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentity
Optional
public readonly workflowGitIdentity: GitIdentity;
- Type: projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public readonly workflowNodeVersion: string;
- Type: string
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public readonly workflowPackageCache: boolean;
- Type: boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOn
Optional
public readonly workflowRunsOn: string[];
- Type: string[]
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public readonly workflowRunsOnGroup: GroupRunnerOptions;
- Type: projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptions
Optional
public readonly yarnBerryOptions: YarnBerryOptions;
- Type: projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
disableNodeWarnings
Optional
public readonly disableNodeWarnings: boolean;
- Type: boolean
- Default: false
Disable node warnings from being emitted during build tasks.
licenseOptions
Optional
public readonly licenseOptions: LicenseOptions;
- Type: LicenseOptions
- Default: Apache-2.0
Default license to apply to all PDK managed packages.
monorepoUpgradeDeps
Optional
public readonly monorepoUpgradeDeps: boolean;
- Type: boolean
- Default: true
Whether to include an upgrade-deps task at the root of the monorepo which will upgrade all dependencies.
monorepoUpgradeDepsOptions
Optional
public readonly monorepoUpgradeDepsOptions: MonorepoUpgradeDepsOptions;
- Type: MonorepoUpgradeDepsOptions
- Default: undefined
Monorepo Upgrade Deps options.
This is only used if monorepoUpgradeDeps is true.
workspaceConfig
Optional
public readonly workspaceConfig: WorkspaceConfig;
- Type: WorkspaceConfig
Configuration for workspace.
MonorepoUpgradeDepsOptions
Configuration for Monorepo Upgrade Deps task.
Initializer
import { MonorepoUpgradeDepsOptions } from '@aws/pdk/monorepo'
const monorepoUpgradeDepsOptions: MonorepoUpgradeDepsOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
syncpackConfig |
aws/pdk/monorepo.Syncpack.SyncpackConfig |
Syncpack configuration. |
taskName |
string |
Name of the task to create. |
syncpackConfig
Optional
public readonly syncpackConfig: SyncpackConfig;
- Type: aws/pdk/monorepo.Syncpack.SyncpackConfig
- Default: Syncpack.DEFAULT_CONFIG
Syncpack configuration.
No merging is performed and as such a complete syncpackConfig is required if supplied.
taskName
Optional
public readonly taskName: string;
- Type: string
- Default: upgrade-deps
Name of the task to create.
NxConfiguratorOptions
NXConfigurator options.
Initializer
import { NxConfiguratorOptions } from '@aws/pdk/monorepo'
const nxConfiguratorOptions: NxConfiguratorOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
defaultReleaseBranch |
string |
Branch that NX affected should run against. |
licenseOptions |
LicenseOptions |
Default package license config. |
defaultReleaseBranch
Optional
public readonly defaultReleaseBranch: string;
- Type: string
Branch that NX affected should run against.
licenseOptions
Optional
public readonly licenseOptions: LicenseOptions;
- Type: LicenseOptions
Default package license config.
If nothing is specified, all packages will default to Apache-2.0 (unless they have their own License component).
NxJsonConfiguration
https://github.com/nrwl/nx/blob/master/packages/nx/src/config/nx-json.ts
Initializer
import { Nx } from '@aws/pdk/monorepo'
const nxJsonConfiguration: Nx.NxJsonConfiguration = { ... }
Properties
Name | Type | Description |
---|---|---|
affected |
aws/pdk/monorepo.Nx.INxAffectedConfig |
Default options for nx affected . |
defaultProject |
string |
Default project. |
extends |
string |
Some presets use the extends property to hide some default options in a separate json file. |
namedInputs |
{[ key: string ]: string[]} |
Named inputs. |
npmScope |
string |
Tells Nx what prefix to use when generating library imports. |
plugins |
string[] |
Plugins for extending the project graph. |
pluginsConfig |
{[ key: string ]: any} |
Configuration for Nx Plugins. |
targetDefaults |
{[ key: string ]: aws/pdk/monorepo.Nx.IProjectTarget} |
Dependencies between different target names across all projects. |
tasksRunnerOptions |
{[ key: string ]: any} |
Available Task Runners. |
workspaceLayout |
aws/pdk/monorepo.Nx.IWorkspaceLayout |
Where new apps + libs should be placed. |
affected
Optional
public readonly affected: INxAffectedConfig;
- Type: aws/pdk/monorepo.Nx.INxAffectedConfig
Default options for nx affected
.
defaultProject
Optional
public readonly defaultProject: string;
- Type: string
Default project.
When project isn't provided, the default project will be used. Convenient for small workspaces with one main application.
extends
Optional
public readonly extends: string;
- Type: string
- Default: "nx/presets/npm.json"
Some presets use the extends property to hide some default options in a separate json file.
The json file specified in the extends property is located in your node_modules folder. The Nx preset files are specified in the nx package.
namedInputs
Optional
public readonly namedInputs: {[ key: string ]: string[]};
- Type: {[ key: string ]: string[]}
Named inputs.
npmScope
Optional
public readonly npmScope: string;
- Type: string
Tells Nx what prefix to use when generating library imports.
plugins
Optional
public readonly plugins: string[];
- Type: string[]
Plugins for extending the project graph.
pluginsConfig
Optional
public readonly pluginsConfig: {[ key: string ]: any};
- Type: {[ key: string ]: any}
Configuration for Nx Plugins.
targetDefaults
Optional
public readonly targetDefaults: {[ key: string ]: IProjectTarget};
- Type: {[ key: string ]: aws/pdk/monorepo.Nx.IProjectTarget}
Dependencies between different target names across all projects.
tasksRunnerOptions
Optional
public readonly tasksRunnerOptions: {[ key: string ]: any};
- Type: {[ key: string ]: any}
Available Task Runners.
workspaceLayout
Optional
public readonly workspaceLayout: IWorkspaceLayout;
- Type: aws/pdk/monorepo.Nx.IWorkspaceLayout
Where new apps + libs should be placed.
ProjectConfig
https://github.com/nrwl/nx/blob/master/packages/nx/schemas/project-schema.json
Initializer
import { Nx } from '@aws/pdk/monorepo'
const projectConfig: Nx.ProjectConfig = { ... }
Properties
Name | Type | Description |
---|---|---|
implicitDependencies |
string[] |
Implicit dependencies. |
includedScripts |
string[] |
Explicit list of scripts for Nx to include. |
name |
string |
Name of project. |
namedInputs |
{[ key: string ]: string[]} |
Named inputs. |
root |
string |
Project root dir path relative to workspace. |
tags |
string[] |
Project tag annotations. |
targets |
{[ key: string ]: aws/pdk/monorepo.Nx.IProjectTarget} |
Targets configuration. |
implicitDependencies
Optional
public readonly implicitDependencies: string[];
- Type: string[]
Implicit dependencies.
https://nx.dev/reference/project-configuration#implicitdependencies
includedScripts
Optional
public readonly includedScripts: string[];
- Type: string[]
Explicit list of scripts for Nx to include.
https://nx.dev/reference/project-configuration#ignoring-package.json-scripts
name
Optional
public readonly name: string;
- Type: string
Name of project.
namedInputs
Optional
public readonly namedInputs: {[ key: string ]: string[]};
- Type: {[ key: string ]: string[]}
Named inputs.
root
Optional
public readonly root: string;
- Type: string
Project root dir path relative to workspace.
tags
Optional
public readonly tags: string[];
- Type: string[]
Project tag annotations.
targets
Optional
public readonly targets: {[ key: string ]: IProjectTarget};
- Type: {[ key: string ]: aws/pdk/monorepo.Nx.IProjectTarget}
Targets configuration.
PythonProjectOptions
PythonProjectOptions.
Initializer
import { PythonProjectOptions } from '@aws/pdk/monorepo'
const pythonProjectOptions: PythonProjectOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
moduleName |
string |
No description. |
name |
string |
No description. |
authorEmail |
string |
Author's e-mail. |
authorName |
string |
Author's name. |
autoApproveOptions |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoMerge |
boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
classifiers |
string[] |
A list of PyPI trove classifiers that describe the project. |
clobber |
boolean |
Add a clobber task which resets the repo to origin. |
commitGenerated |
boolean |
Whether to commit the managed files by default. |
deps |
string[] |
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver> . |
description |
string |
A short description of the package. |
devContainer |
boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
string[] |
List of dev dependencies for this project. Dependencies use the format: <module>@<semver> . |
github |
boolean |
Enable GitHub integration. |
githubOptions |
projen.github.GitHubOptions |
Options for GitHub integration. |
gitIgnoreOptions |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
projen.GitOptions |
Configuration options for git. |
gitpod |
boolean |
Add a Gitpod development environment. |
homepage |
string |
A URL to the website of the project. |
license |
string |
License of this package as an SPDX identifier. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
mergify |
boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
projen.github.MergifyOptions |
Options for mergify. |
outdir |
string |
The root directory of the project. Relative to this directory, all files are synthesized. |
packageName |
string |
Package name. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
poetryOptions |
projen.python.PoetryPyprojectOptionsWithoutDeps |
Additional options to set for poetry if using poetry. |
projectType |
projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
string |
The shell command to use in order to run the projen CLI. |
projenCredentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenrcJson |
boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcPythonOptions |
projen.python.ProjenrcOptions |
Options related to projenrc in python. |
projenTokenSecret |
string |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
pytest |
boolean |
Include pytest tests. |
pytestOptions |
projen.python.PytestOptions |
pytest options. |
pythonExec |
string |
Path to the python executable to use. |
readme |
projen.SampleReadmeProps |
The README setup. |
renovatebot |
boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
projen.RenovatebotOptions |
Options for renovatebot. |
sample |
boolean |
Include sample code and test if the relevant directories don't exist. |
setupConfig |
{[ key: string ]: any} |
Additional fields to pass in the setup() function if using setuptools. |
setuptools |
boolean |
Use setuptools with a setup.py script for packaging and publishing. |
stale |
boolean |
Auto-close of stale issues and pull request. |
staleOptions |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
version |
string |
Version of the package. |
vscode |
boolean |
Enable VSCode integration. |
moduleName
Required
public readonly moduleName: string;
- Type: string
- Default: $PYTHON_MODULE_NAME
name
Required
public readonly name: string;
- Type: string
- Default: $BASEDIR
authorEmail
Optional
public readonly authorEmail: string;
- Type: string
- Default: $GIT_USER_EMAIL
Author's e-mail.
authorName
Optional
public readonly authorName: string;
- Type: string
- Default: $GIT_USER_NAME
Author's name.
autoApproveOptions
Optional
public readonly autoApproveOptions: AutoApproveOptions;
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoMerge
Optional
public readonly autoMerge: boolean;
- Type: boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptions
Optional
public readonly autoMergeOptions: AutoMergeOptions;
- Type: projen.github.AutoMergeOptions
- Default: see defaults in
AutoMergeOptions
Configure options for automatic merging on GitHub.
Has no effect if
github.mergify
or autoMerge
is set to false.
classifiers
Optional
public readonly classifiers: string[];
- Type: string[]
A list of PyPI trove classifiers that describe the project.
clobber
Optional
public readonly clobber: boolean;
- Type: boolean
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
commitGenerated
Optional
public readonly commitGenerated: boolean;
- Type: boolean
- Default: true
Whether to commit the managed files by default.
deps
Optional
public readonly deps: string[];
- Type: string[]
- Default: []
List of runtime dependencies for this project. Dependencies use the format: <module>@<semver>
.
Additional dependencies can be added via project.addDependency()
.
description
Optional
public readonly description: string;
- Type: string
A short description of the package.
devContainer
Optional
public readonly devContainer: boolean;
- Type: boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
public readonly devDeps: string[];
- Type: string[]
- Default: []
List of dev dependencies for this project. Dependencies use the format: <module>@<semver>
.
Additional dependencies can be added via project.addDevDependency()
.
github
Optional
public readonly github: boolean;
- Type: boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptions
Optional
public readonly githubOptions: GitHubOptions;
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitIgnoreOptions
Optional
public readonly gitIgnoreOptions: IgnoreFileOptions;
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public readonly gitOptions: GitOptions;
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
public readonly gitpod: boolean;
- Type: boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public readonly homepage: string;
- Type: string
A URL to the website of the project.
license
Optional
public readonly license: string;
- Type: string
License of this package as an SPDX identifier.
logging
Optional
public readonly logging: LoggerOptions;
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
public readonly mergify: boolean;
- Type: boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
public readonly mergifyOptions: MergifyOptions;
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
outdir
Optional
public readonly outdir: string;
- Type: string
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
packageName
Optional
public readonly packageName: string;
- Type: string
Package name.
parent
Optional
public readonly parent: Project;
- Type: projen.Project
The parent project, if this project is part of a bigger project.
poetryOptions
Optional
public readonly poetryOptions: PoetryPyprojectOptionsWithoutDeps;
- Type: projen.python.PoetryPyprojectOptionsWithoutDeps
Additional options to set for poetry if using poetry.
~~projectType
~~Optional
- Deprecated: no longer supported at the base project level
public readonly projectType: ProjectType;
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommand
Optional
public readonly projenCommand: string;
- Type: string
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentials
Optional
public readonly projenCredentials: GithubCredentials;
- Type: projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenrcJson
Optional
public readonly projenrcJson: boolean;
- Type: boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcPythonOptions
Optional
public readonly projenrcPythonOptions: ProjenrcOptions;
- Type: projen.python.ProjenrcOptions
- Default: default options
Options related to projenrc in python.
~~projenTokenSecret
~~Optional
- Deprecated: use
projenCredentials
public readonly projenTokenSecret: string;
- Type: string
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo
, workflows
and packages
scope.
pytest
Optional
public readonly pytest: boolean;
- Type: boolean
- Default: true
Include pytest tests.
pytestOptions
Optional
public readonly pytestOptions: PytestOptions;
- Type: projen.python.PytestOptions
- Default: defaults
pytest options.
pythonExec
Optional
public readonly pythonExec: string;
- Type: string
- Default: "python"
Path to the python executable to use.
readme
Optional
public readonly readme: SampleReadmeProps;
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
renovatebot
Optional
public readonly renovatebot: boolean;
- Type: boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public readonly renovatebotOptions: RenovatebotOptions;
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
sample
Optional
public readonly sample: boolean;
- Type: boolean
- Default: true
Include sample code and test if the relevant directories don't exist.
setupConfig
Optional
public readonly setupConfig: {[ key: string ]: any};
- Type: {[ key: string ]: any}
Additional fields to pass in the setup() function if using setuptools.
setuptools
Optional
public readonly setuptools: boolean;
- Type: boolean
- Default: true, unless poetry is true, then false
Use setuptools with a setup.py script for packaging and publishing.
stale
Optional
public readonly stale: boolean;
- Type: boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
public readonly staleOptions: StaleOptions;
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
version
Optional
public readonly version: string;
- Type: string
- Default: "0.1.0"
Version of the package.
vscode
Optional
public readonly vscode: boolean;
- Type: boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
RunManyOptions
Initializer
import { Nx } from '@aws/pdk/monorepo'
const runManyOptions: Nx.RunManyOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
target |
string |
Task to run for affected projects. |
configuration |
string |
This is the configuration to use when performing tasks on projects. |
exclude |
string |
Exclude certain projects from being processed. |
ignoreCycles |
boolean |
Ignore cycles in the task graph. |
noBail |
boolean |
Do not stop command execution after the first failed task. |
outputStyle |
string |
Defines how Nx emits outputs tasks logs. |
parallel |
number |
Max number of parallel processes. |
projects |
string[] |
Project to run as list project names and/or patterns. |
runner |
string |
This is the name of the tasks runner configuration in nx.json. |
skipCache |
boolean |
Rerun the tasks even when the results are available in the cache. |
verbose |
boolean |
Prints additional information about the commands (e.g. stack traces). |
target
Required
public readonly target: string;
- Type: string
Task to run for affected projects.
configuration
Optional
public readonly configuration: string;
- Type: string
This is the configuration to use when performing tasks on projects.
exclude
Optional
public readonly exclude: string;
- Type: string
Exclude certain projects from being processed.
ignoreCycles
Optional
public readonly ignoreCycles: boolean;
- Type: boolean
Ignore cycles in the task graph.
noBail
Optional
public readonly noBail: boolean;
- Type: boolean
Do not stop command execution after the first failed task.
outputStyle
Optional
public readonly outputStyle: string;
- Type: string
- Default: "stream"
Defines how Nx emits outputs tasks logs.
parallel
Optional
public readonly parallel: number;
- Type: number
- Default: 3
Max number of parallel processes.
projects
Optional
public readonly projects: string[];
- Type: string[]
Project to run as list project names and/or patterns.
runner
Optional
public readonly runner: string;
- Type: string
This is the name of the tasks runner configuration in nx.json.
skipCache
Optional
public readonly skipCache: boolean;
- Type: boolean
Rerun the tasks even when the results are available in the cache.
verbose
Optional
public readonly verbose: boolean;
- Type: boolean
Prints additional information about the commands (e.g. stack traces).
SyncpackConfig
Configuration for Syncpack.
Initializer
import { Syncpack } from '@aws/pdk/monorepo'
const syncpackConfig: Syncpack.SyncpackConfig = { ... }
Properties
Name | Type | Description |
---|---|---|
customTypes |
{[ key: string ]: aws/pdk/monorepo.Syncpack.CustomTypeConfig.NameAndVersionProps | aws/pdk/monorepo.Syncpack.CustomTypeConfig.NamedVersionString | aws/pdk/monorepo.Syncpack.CustomTypeConfig.UnnamedVersionString | aws/pdk/monorepo.Syncpack.CustomTypeConfig.VersionsByName} |
No description. |
dependencyTypes |
string[] |
No description. |
filter |
string |
No description. |
formatBugs |
boolean |
No description. |
formatRepository |
boolean |
No description. |
indent |
string |
No description. |
lintFormatting |
boolean |
No description. |
lintSemverRanges |
boolean |
No description. |
lintVersions |
boolean |
No description. |
semverGroups |
aws/pdk/monorepo.Syncpack.SemverGroupConfig.Disabled | aws/pdk/monorepo.Syncpack.SemverGroupConfig.Ignored | aws/pdk/monorepo.Syncpack.SemverGroupConfig.WithRange[] |
No description. |
sortAz |
string[] |
No description. |
sortExports |
string[] |
No description. |
sortFirst |
string[] |
No description. |
sortPackages |
boolean |
No description. |
source |
string[] |
No description. |
specifierTypes |
string[] |
No description. |
versionGroups |
aws/pdk/monorepo.Syncpack.VersionGroupConfig.Banned | aws/pdk/monorepo.Syncpack.VersionGroupConfig.Ignored | aws/pdk/monorepo.Syncpack.VersionGroupConfig.Pinned | aws/pdk/monorepo.Syncpack.VersionGroupConfig.SnappedTo | aws/pdk/monorepo.Syncpack.VersionGroupConfig.SameRange | aws/pdk/monorepo.Syncpack.VersionGroupConfig.Standard[] |
No description. |
customTypes
Optional
public readonly customTypes: {[ key: string ]: NameAndVersionProps | NamedVersionString | UnnamedVersionString | VersionsByName};
- Type: {[ key: string ]: aws/pdk/monorepo.Syncpack.CustomTypeConfig.NameAndVersionProps | aws/pdk/monorepo.Syncpack.CustomTypeConfig.NamedVersionString | aws/pdk/monorepo.Syncpack.CustomTypeConfig.UnnamedVersionString | aws/pdk/monorepo.Syncpack.CustomTypeConfig.VersionsByName}
dependencyTypes
Optional
public readonly dependencyTypes: string[];
- Type: string[]
https://jamiemason.github.io/syncpack/config/dependency-types
filter
Optional
public readonly filter: string;
- Type: string
formatBugs
Optional
public readonly formatBugs: boolean;
- Type: boolean
formatRepository
Optional
public readonly formatRepository: boolean;
- Type: boolean
https://jamiemason.github.io/syncpack/config/format-repository
indent
Optional
public readonly indent: string;
- Type: string
lintFormatting
Optional
public readonly lintFormatting: boolean;
- Type: boolean
https://jamiemason.github.io/syncpack/config/lint-formatting
lintSemverRanges
Optional
public readonly lintSemverRanges: boolean;
- Type: boolean
https://jamiemason.github.io/syncpack/config/lint-semver-ranges
lintVersions
Optional
public readonly lintVersions: boolean;
- Type: boolean
semverGroups
Optional
public readonly semverGroups: Disabled | Ignored | WithRange[];
- Type: aws/pdk/monorepo.Syncpack.SemverGroupConfig.Disabled | aws/pdk/monorepo.Syncpack.SemverGroupConfig.Ignored | aws/pdk/monorepo.Syncpack.SemverGroupConfig.WithRange[]
sortAz
Optional
public readonly sortAz: string[];
- Type: string[]
sortExports
Optional
public readonly sortExports: string[];
- Type: string[]
sortFirst
Optional
public readonly sortFirst: string[];
- Type: string[]
sortPackages
Optional
public readonly sortPackages: boolean;
- Type: boolean
source
Optional
public readonly source: string[];
- Type: string[]
specifierTypes
Optional
public readonly specifierTypes: string[];
- Type: string[]
https://jamiemason.github.io/syncpack/config/specifier-types
versionGroups
Optional
public readonly versionGroups: Banned | Ignored | Pinned | SnappedTo | SameRange | Standard[];
- Type: aws/pdk/monorepo.Syncpack.VersionGroupConfig.Banned | aws/pdk/monorepo.Syncpack.VersionGroupConfig.Ignored | aws/pdk/monorepo.Syncpack.VersionGroupConfig.Pinned | aws/pdk/monorepo.Syncpack.VersionGroupConfig.SnappedTo | aws/pdk/monorepo.Syncpack.VersionGroupConfig.SameRange | aws/pdk/monorepo.Syncpack.VersionGroupConfig.Standard[]
TypeScriptProjectOptions
TypeScriptProjectOptions.
Initializer
import { TypeScriptProjectOptions } from '@aws/pdk/monorepo'
const typeScriptProjectOptions: TypeScriptProjectOptions = { ... }
Properties
Name | Type | Description |
---|---|---|
name |
string |
No description. |
allowLibraryDependencies |
boolean |
Allow the project to include peerDependencies and bundledDependencies . |
artifactsDirectory |
string |
A directory which will contain build artifacts. |
authorEmail |
string |
Author's e-mail. |
authorName |
string |
Author's name. |
authorOrganization |
boolean |
Is the author an organization. |
authorUrl |
string |
Author's URL / Website. |
autoApproveOptions |
projen.github.AutoApproveOptions |
Enable and configure the 'auto approve' workflow. |
autoApproveUpgrades |
boolean |
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). |
autoDetectBin |
boolean |
Automatically add all executables under the bin directory to your package.json file under the bin section. |
autoMerge |
boolean |
Enable automatic merging on GitHub. |
autoMergeOptions |
projen.github.AutoMergeOptions |
Configure options for automatic merging on GitHub. |
bin |
{[ key: string ]: string} |
Binary programs vended with your module. |
bugsEmail |
string |
The email address to which issues should be reported. |
bugsUrl |
string |
The url to your project's issue tracker. |
buildWorkflow |
boolean |
Define a GitHub workflow for building PRs. |
buildWorkflowOptions |
projen.javascript.BuildWorkflowOptions |
Options for PR build workflow. |
buildWorkflowTriggers |
projen.github.workflows.Triggers |
Build workflow triggers. |
bundledDeps |
string[] |
List of dependencies to bundle into this module. |
bundlerOptions |
projen.javascript.BundlerOptions |
Options for Bundler . |
checkLicenses |
projen.javascript.LicenseCheckerOptions |
Configure which licenses should be deemed acceptable for use by dependencies. |
clobber |
boolean |
Add a clobber task which resets the repo to origin. |
codeArtifactOptions |
projen.javascript.CodeArtifactOptions |
Options for npm packages using AWS CodeArtifact. |
codeCov |
boolean |
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with @codeCovTokenSecret . |
codeCovTokenSecret |
string |
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. |
commitGenerated |
boolean |
Whether to commit the managed files by default. |
copyrightOwner |
string |
License copyright owner. |
copyrightPeriod |
string |
The copyright years to put in the LICENSE file. |
defaultReleaseBranch |
string |
The name of the main release branch. |
dependabot |
boolean |
Use dependabot to handle dependency upgrades. |
dependabotOptions |
projen.github.DependabotOptions |
Options for dependabot. |
deps |
string[] |
Runtime dependencies of this module. |
depsUpgrade |
boolean |
Use tasks and github workflows to handle dependency upgrades. |
depsUpgradeOptions |
projen.javascript.UpgradeDependenciesOptions |
Options for UpgradeDependencies . |
description |
string |
The description is just a string that helps people understand the purpose of the package. |
devContainer |
boolean |
Add a VSCode development environment (used for GitHub Codespaces). |
devDeps |
string[] |
Build dependencies for this module. |
disableTsconfig |
boolean |
Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler). |
disableTsconfigDev |
boolean |
Do not generate a tsconfig.dev.json file. |
docgen |
boolean |
Docgen by Typedoc. |
docsDirectory |
string |
Docs directory. |
entrypoint |
string |
Module entrypoint (main in package.json ). Set to an empty string to not include main in your package.json. |
entrypointTypes |
string |
The .d.ts file that includes the type declarations for this module. |
eslint |
boolean |
Setup eslint. |
eslintOptions |
projen.javascript.EslintOptions |
Eslint options. |
github |
boolean |
Enable GitHub integration. |
githubOptions |
projen.github.GitHubOptions |
Options for GitHub integration. |
gitignore |
string[] |
Additional entries to .gitignore. |
gitIgnoreOptions |
projen.IgnoreFileOptions |
Configuration options for .gitignore file. |
gitOptions |
projen.GitOptions |
Configuration options for git. |
gitpod |
boolean |
Add a Gitpod development environment. |
homepage |
string |
Package's Homepage / Website. |
jest |
boolean |
Setup jest unit tests. |
jestOptions |
projen.javascript.JestOptions |
Jest options. |
jsiiReleaseVersion |
string |
Version requirement of publib which is used to publish modules to npm. |
keywords |
string[] |
Keywords to include in package.json . |
libdir |
string |
Typescript artifacts output directory. |
license |
string |
License's SPDX identifier. |
licensed |
boolean |
Indicates if a license should be added. |
logging |
projen.LoggerOptions |
Configure logging options such as verbosity. |
majorVersion |
number |
Major version to release from the default branch. |
maxNodeVersion |
string |
Minimum node.js version to require via engines (inclusive). |
mergify |
boolean |
Whether mergify should be enabled on this repository or not. |
mergifyOptions |
projen.github.MergifyOptions |
Options for mergify. |
minMajorVersion |
number |
Minimal Major version to release. |
minNodeVersion |
string |
Minimum Node.js version to require via package.json engines (inclusive). |
mutableBuild |
boolean |
Automatically update files modified during builds to pull-request branches. |
npmAccess |
projen.javascript.NpmAccess |
Access level of the npm package. |
npmDistTag |
string |
The npmDistTag to use when publishing from the default branch. |
npmignore |
string[] |
Additional entries to .npmignore. |
npmignoreEnabled |
boolean |
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. |
npmIgnoreOptions |
projen.IgnoreFileOptions |
Configuration options for .npmignore file. |
npmProvenance |
boolean |
Should provenance statements be generated when the package is published. |
npmRegistry |
string |
The host name of the npm registry to publish to. |
npmRegistryUrl |
string |
The base URL of the npm package registry. |
npmTokenSecret |
string |
GitHub secret which contains the NPM token to use when publishing packages. |
outdir |
string |
The root directory of the project. Relative to this directory, all files are synthesized. |
package |
boolean |
Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist ). |
packageManager |
projen.javascript.NodePackageManager |
The Node Package Manager used to execute scripts. |
packageName |
string |
The "name" in package.json. |
parent |
projen.Project |
The parent project, if this project is part of a bigger project. |
peerDependencyOptions |
projen.javascript.PeerDependencyOptions |
Options for peerDeps . |
peerDeps |
string[] |
Peer dependencies for this module. |
pnpmVersion |
string |
The version of PNPM to use if using PNPM as a package manager. |
postBuildSteps |
projen.github.workflows.JobStep[] |
Steps to execute after build as part of the release workflow. |
prerelease |
string |
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). |
prettier |
boolean |
Setup prettier. |
prettierOptions |
projen.javascript.PrettierOptions |
Prettier options. |
projectType |
projen.ProjectType |
Which type of project this is (library/app). |
projenCommand |
string |
The shell command to use in order to run the projen CLI. |
projenCredentials |
projen.github.GithubCredentials |
Choose a method of providing GitHub API access for projen workflows. |
projenDevDependency |
boolean |
Indicates of "projen" should be installed as a devDependency. |
projenrcJs |
boolean |
Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation. |
projenrcJson |
boolean |
Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation. |
projenrcJsonOptions |
projen.ProjenrcJsonOptions |
Options for .projenrc.json. |
projenrcJsOptions |
projen.javascript.ProjenrcOptions |
Options for .projenrc.js. |
projenrcTs |
boolean |
Use TypeScript for your projenrc file (.projenrc.ts ). |
projenrcTsOptions |
projen.typescript.ProjenrcOptions |
Options for .projenrc.ts. |
projenTokenSecret |
string |
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. |
projenVersion |
string |
Version of projen to install. |
publishDryRun |
boolean |
Instead of actually publishing to package managers, just print the publishing command. |
publishTasks |
boolean |
Define publishing tasks that can be executed manually as well as workflows. |
pullRequestTemplate |
boolean |
Include a GitHub pull request template. |
pullRequestTemplateContents |
string[] |
The contents of the pull request template. |
readme |
projen.SampleReadmeProps |
The README setup. |
releasableCommits |
projen.ReleasableCommits |
Find commits that should be considered releasable Used to decide if a release is required. |
release |
boolean |
Add release management to this project. |
releaseBranches |
{[ key: string ]: projen.release.BranchOptions} |
Defines additional release branches. |
releaseEveryCommit |
boolean |
Automatically release new versions every commit to one of branches in releaseBranches . |
releaseFailureIssue |
boolean |
Create a github issue on every failed publishing task. |
releaseFailureIssueLabel |
string |
The label to apply to issues indicating publish failures. |
releaseSchedule |
string |
CRON schedule to trigger new releases. |
releaseTagPrefix |
string |
Automatically add the given prefix to release tags. |
releaseToNpm |
boolean |
Automatically release to npm when new versions are introduced. |
releaseTrigger |
projen.release.ReleaseTrigger |
The release trigger to use. |
releaseWorkflow |
boolean |
DEPRECATED: renamed to release . |
releaseWorkflowName |
string |
The name of the default release workflow. |
releaseWorkflowSetupSteps |
projen.github.workflows.JobStep[] |
A set of workflow steps to execute in order to setup the workflow container. |
renovatebot |
boolean |
Use renovatebot to handle dependency upgrades. |
renovatebotOptions |
projen.RenovatebotOptions |
Options for renovatebot. |
repository |
string |
The repository is the location where the actual code for your package lives. |
repositoryDirectory |
string |
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives. |
sampleCode |
boolean |
Generate one-time sample in src/ and test/ if there are no files there. |
scopedPackagesOptions |
projen.javascript.ScopedPackagesOptions[] |
Options for privately hosted scoped packages. |
scripts |
{[ key: string ]: string} |
npm scripts to include. |
srcdir |
string |
Typescript sources directory. |
stability |
string |
Package's Stability. |
stale |
boolean |
Auto-close of stale issues and pull request. |
staleOptions |
projen.github.StaleOptions |
Auto-close stale issues and pull requests. |
testdir |
string |
Jest tests directory. |
tsconfig |
projen.javascript.TypescriptConfigOptions |
Custom TSConfig. |
tsconfigDev |
projen.javascript.TypescriptConfigOptions |
Custom tsconfig options for the development tsconfig.json file (used for testing). |
tsconfigDevFile |
string |
The name of the development tsconfig.json file. |
tsJestOptions |
projen.typescript.TsJestOptions |
Options for ts-jest. |
typescriptVersion |
string |
TypeScript version to use. |
versionrcOptions |
{[ key: string ]: any} |
Custom configuration used when creating changelog with standard-version package. |
vscode |
boolean |
Enable VSCode integration. |
workflowBootstrapSteps |
projen.github.workflows.JobStep[] |
Workflow steps to use in order to bootstrap this repo. |
workflowContainerImage |
string |
Container image to use for GitHub workflows. |
workflowGitIdentity |
projen.github.GitIdentity |
The git identity to use in workflows. |
workflowNodeVersion |
string |
The node version to use in GitHub workflows. |
workflowPackageCache |
boolean |
Enable Node.js package cache in GitHub workflows. |
workflowRunsOn |
string[] |
Github Runner selection labels. |
workflowRunsOnGroup |
projen.GroupRunnerOptions |
Github Runner Group selection options. |
yarnBerryOptions |
projen.javascript.YarnBerryOptions |
Options for Yarn Berry. |
name
Required
public readonly name: string;
- Type: string
- Default: $BASEDIR
allowLibraryDependencies
Optional
public readonly allowLibraryDependencies: boolean;
- Type: boolean
- Default: true
Allow the project to include peerDependencies
and bundledDependencies
.
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
artifactsDirectory
Optional
public readonly artifactsDirectory: string;
- Type: string
- Default: "dist"
A directory which will contain build artifacts.
authorEmail
Optional
public readonly authorEmail: string;
- Type: string
Author's e-mail.
authorName
Optional
public readonly authorName: string;
- Type: string
Author's name.
authorOrganization
Optional
public readonly authorOrganization: boolean;
- Type: boolean
Is the author an organization.
authorUrl
Optional
public readonly authorUrl: string;
- Type: string
Author's URL / Website.
autoApproveOptions
Optional
public readonly autoApproveOptions: AutoApproveOptions;
- Type: projen.github.AutoApproveOptions
- Default: auto approve is disabled
Enable and configure the 'auto approve' workflow.
autoApproveUpgrades
Optional
public readonly autoApproveUpgrades: boolean;
- Type: boolean
- Default: true
Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
Throw if set to true but autoApproveOptions
are not defined.
autoDetectBin
Optional
public readonly autoDetectBin: boolean;
- Type: boolean
- Default: true
Automatically add all executables under the bin
directory to your package.json
file under the bin
section.
autoMerge
Optional
public readonly autoMerge: boolean;
- Type: boolean
- Default: true
Enable automatic merging on GitHub.
Has no effect if github.mergify
is set to false.
autoMergeOptions
Optional
public readonly autoMergeOptions: AutoMergeOptions;
- Type: projen.github.AutoMergeOptions
- Default: see defaults in
AutoMergeOptions
Configure options for automatic merging on GitHub.
Has no effect if
github.mergify
or autoMerge
is set to false.
bin
Optional
public readonly bin: {[ key: string ]: string};
- Type: {[ key: string ]: string}
Binary programs vended with your module.
You can use this option to add/customize how binaries are represented in
your package.json
, but unless autoDetectBin
is false
, every
executable file under bin
will automatically be added to this section.
bugsEmail
Optional
public readonly bugsEmail: string;
- Type: string
The email address to which issues should be reported.
bugsUrl
Optional
public readonly bugsUrl: string;
- Type: string
The url to your project's issue tracker.
buildWorkflow
Optional
public readonly buildWorkflow: boolean;
- Type: boolean
- Default: true if not a subproject
Define a GitHub workflow for building PRs.
buildWorkflowOptions
Optional
public readonly buildWorkflowOptions: BuildWorkflowOptions;
- Type: projen.javascript.BuildWorkflowOptions
Options for PR build workflow.
~~buildWorkflowTriggers
~~Optional
- Deprecated: - Use
buildWorkflowOptions.workflowTriggers
public readonly buildWorkflowTriggers: Triggers;
- Type: projen.github.workflows.Triggers
- Default: "{ pullRequest: {}, workflowDispatch: {} }"
Build workflow triggers.
bundledDeps
Optional
public readonly bundledDeps: string[];
- Type: string[]
List of dependencies to bundle into this module.
These modules will be
added both to the dependencies
section and bundledDependencies
section of
your package.json
.
The recommendation is to only specify the module name here (e.g.
express
). This will behave similar to yarn add
or npm install
in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^
). You can specify semver requirements in
the same syntax passed to npm i
or yarn add
(e.g. express@^2
) and
this will be what you package.json
will eventually include.
bundlerOptions
Optional
public readonly bundlerOptions: BundlerOptions;
- Type: projen.javascript.BundlerOptions
Options for Bundler
.
checkLicenses
Optional
public readonly checkLicenses: LicenseCheckerOptions;
- Type: projen.javascript.LicenseCheckerOptions
- Default: no license checks are run during the build and all licenses will be accepted
Configure which licenses should be deemed acceptable for use by dependencies.
This setting will cause the build to fail, if any prohibited or not allowed licenses ares encountered.
clobber
Optional
public readonly clobber: boolean;
- Type: boolean
- Default: true, but false for subprojects
Add a clobber
task which resets the repo to origin.
codeArtifactOptions
Optional
public readonly codeArtifactOptions: CodeArtifactOptions;
- Type: projen.javascript.CodeArtifactOptions
- Default: undefined
Options for npm packages using AWS CodeArtifact.
This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact
codeCov
Optional
public readonly codeCov: boolean;
- Type: boolean
- Default: false
Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v4 A secret is required for private repos. Configured with @codeCovTokenSecret
.
codeCovTokenSecret
Optional
public readonly codeCovTokenSecret: string;
- Type: string
- Default: if this option is not specified, only public repositories are supported
Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
commitGenerated
Optional
public readonly commitGenerated: boolean;
- Type: boolean
- Default: true
Whether to commit the managed files by default.
copyrightOwner
Optional
public readonly copyrightOwner: string;
- Type: string
- Default: defaults to the value of authorName or "" if
authorName
is undefined.
License copyright owner.
copyrightPeriod
Optional
public readonly copyrightPeriod: string;
- Type: string
- Default: current year
The copyright years to put in the LICENSE file.
defaultReleaseBranch
Optional
public readonly defaultReleaseBranch: string;
- Type: string
- Default: "main"
The name of the main release branch.
dependabot
Optional
public readonly dependabot: boolean;
- Type: boolean
- Default: false
Use dependabot to handle dependency upgrades.
Cannot be used in conjunction with depsUpgrade
.
dependabotOptions
Optional
public readonly dependabotOptions: DependabotOptions;
- Type: projen.github.DependabotOptions
- Default: default options
Options for dependabot.
deps
Optional
public readonly deps: string[];
- Type: string[]
- Default: []
Runtime dependencies of this module.
The recommendation is to only specify the module name here (e.g.
express
). This will behave similar to yarn add
or npm install
in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^
). You can specify semver requirements in
the same syntax passed to npm i
or yarn add
(e.g. express@^2
) and
this will be what you package.json
will eventually include.
depsUpgrade
Optional
public readonly depsUpgrade: boolean;
- Type: boolean
- Default: true
Use tasks and github workflows to handle dependency upgrades.
Cannot be used in conjunction with dependabot
.
depsUpgradeOptions
Optional
public readonly depsUpgradeOptions: UpgradeDependenciesOptions;
- Type: projen.javascript.UpgradeDependenciesOptions
- Default: default options
Options for UpgradeDependencies
.
description
Optional
public readonly description: string;
- Type: string
The description is just a string that helps people understand the purpose of the package.
It can be used when searching for packages in a package manager as well. See https://classic.yarnpkg.com/en/docs/package-json/#toc-description
devContainer
Optional
public readonly devContainer: boolean;
- Type: boolean
- Default: false
Add a VSCode development environment (used for GitHub Codespaces).
devDeps
Optional
public readonly devDeps: string[];
- Type: string[]
- Default: []
Build dependencies for this module.
These dependencies will only be available in your build environment but will not be fetched when this module is consumed.
The recommendation is to only specify the module name here (e.g.
express
). This will behave similar to yarn add
or npm install
in the
sense that it will add the module as a dependency to your package.json
file with the latest version (^
). You can specify semver requirements in
the same syntax passed to npm i
or yarn add
(e.g. express@^2
) and
this will be what you package.json
will eventually include.
disableTsconfig
Optional
public readonly disableTsconfig: boolean;
- Type: boolean
- Default: false
Do not generate a tsconfig.json
file (used by jsii projects since tsconfig.json is generated by the jsii compiler).
disableTsconfigDev
Optional
public readonly disableTsconfigDev: boolean;
- Type: boolean
- Default: false
Do not generate a tsconfig.dev.json
file.
docgen
Optional
public readonly docgen: boolean;
- Type: boolean
- Default: false
Docgen by Typedoc.
docsDirectory
Optional
public readonly docsDirectory: string;
- Type: string
- Default: "docs"
Docs directory.
entrypoint
Optional
public readonly entrypoint: string;
- Type: string
- Default: "lib/index.js"
Module entrypoint (main
in package.json
). Set to an empty string to not include main
in your package.json.
entrypointTypes
Optional
public readonly entrypointTypes: string;
- Type: string
- Default: .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
The .d.ts file that includes the type declarations for this module.
eslint
Optional
public readonly eslint: boolean;
- Type: boolean
- Default: true
Setup eslint.
eslintOptions
Optional
public readonly eslintOptions: EslintOptions;
- Type: projen.javascript.EslintOptions
- Default: opinionated default options
Eslint options.
github
Optional
public readonly github: boolean;
- Type: boolean
- Default: true
Enable GitHub integration.
Enabled by default for root projects. Disabled for non-root projects.
githubOptions
Optional
public readonly githubOptions: GitHubOptions;
- Type: projen.github.GitHubOptions
- Default: see GitHubOptions
Options for GitHub integration.
gitignore
Optional
public readonly gitignore: string[];
- Type: string[]
Additional entries to .gitignore.
gitIgnoreOptions
Optional
public readonly gitIgnoreOptions: IgnoreFileOptions;
- Type: projen.IgnoreFileOptions
Configuration options for .gitignore file.
gitOptions
Optional
public readonly gitOptions: GitOptions;
- Type: projen.GitOptions
Configuration options for git.
gitpod
Optional
public readonly gitpod: boolean;
- Type: boolean
- Default: false
Add a Gitpod development environment.
homepage
Optional
public readonly homepage: string;
- Type: string
Package's Homepage / Website.
jest
Optional
public readonly jest: boolean;
- Type: boolean
- Default: true
Setup jest unit tests.
jestOptions
Optional
public readonly jestOptions: JestOptions;
- Type: projen.javascript.JestOptions
- Default: default options
Jest options.
jsiiReleaseVersion
Optional
public readonly jsiiReleaseVersion: string;
- Type: string
- Default: "latest"
Version requirement of publib
which is used to publish modules to npm.
keywords
Optional
public readonly keywords: string[];
- Type: string[]
Keywords to include in package.json
.
libdir
Optional
public readonly libdir: string;
- Type: string
- Default: "lib"
Typescript artifacts output directory.
license
Optional
public readonly license: string;
- Type: string
- Default: "Apache-2.0"
License's SPDX identifier.
See https://github.com/projen/projen/tree/main/license-text for a list of supported licenses.
Use the licensed
option if you want to no license to be specified.
licensed
Optional
public readonly licensed: boolean;
- Type: boolean
- Default: true
Indicates if a license should be added.
logging
Optional
public readonly logging: LoggerOptions;
- Type: projen.LoggerOptions
- Default: {}
Configure logging options such as verbosity.
majorVersion
Optional
public readonly majorVersion: number;
- Type: number
- Default: Major version is not enforced.
Major version to release from the default branch.
If this is specified, we bump the latest version of this major version line. If not specified, we bump the global latest version.
maxNodeVersion
Optional
public readonly maxNodeVersion: string;
- Type: string
- Default: no max
Minimum node.js version to require via engines
(inclusive).
~~mergify
~~Optional
- Deprecated: use
githubOptions.mergify
instead
public readonly mergify: boolean;
- Type: boolean
- Default: true
Whether mergify should be enabled on this repository or not.
~~mergifyOptions
~~Optional
- Deprecated: use
githubOptions.mergifyOptions
instead
public readonly mergifyOptions: MergifyOptions;
- Type: projen.github.MergifyOptions
- Default: default options
Options for mergify.
minMajorVersion
Optional
public readonly minMajorVersion: number;
- Type: number
- Default: No minimum version is being enforced
Minimal Major version to release.
This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.
Can not be set together with majorVersion
.
minNodeVersion
Optional
public readonly minNodeVersion: string;
- Type: string
- Default: no "engines" specified
Minimum Node.js version to require via package.json engines
(inclusive).
~~mutableBuild
~~Optional
- Deprecated: - Use
buildWorkflowOptions.mutableBuild
public readonly mutableBuild: boolean;
- Type: boolean
- Default: true
Automatically update files modified during builds to pull-request branches.
This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged.
Implies that PR builds do not have anti-tamper checks.
npmAccess
Optional
public readonly npmAccess: NpmAccess;
- Type: projen.javascript.NpmAccess
- Default: for scoped packages (e.g.
foo@bar
), the default isNpmAccess.RESTRICTED
, for non-scoped packages, the default isNpmAccess.PUBLIC
.
Access level of the npm package.
npmDistTag
Optional
public readonly npmDistTag: string;
- Type: string
- Default: "latest"
The npmDistTag to use when publishing from the default branch.
To set the npm dist-tag for release branches, set the npmDistTag
property
for each branch.
~~npmignore
~~Optional
- Deprecated: - use
project.addPackageIgnore
public readonly npmignore: string[];
- Type: string[]
Additional entries to .npmignore.
npmignoreEnabled
Optional
public readonly npmignoreEnabled: boolean;
- Type: boolean
- Default: true
Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.
npmIgnoreOptions
Optional
public readonly npmIgnoreOptions: IgnoreFileOptions;
- Type: projen.IgnoreFileOptions
Configuration options for .npmignore file.
npmProvenance
Optional
public readonly npmProvenance: boolean;
- Type: boolean
- Default: true for public packages, false otherwise
Should provenance statements be generated when the package is published.
A supported package manager is required to publish a package with npm provenance statements and you will need to use a supported CI/CD provider.
Note that the projen Release
and Publisher
components are using publib
to publish packages,
which is using npm internally and supports provenance statements independently of the package manager used.
~~npmRegistry
~~Optional
- Deprecated: use
npmRegistryUrl
instead
public readonly npmRegistry: string;
- Type: string
The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl
.
npmRegistryUrl
Optional
public readonly npmRegistryUrl: string;
- Type: string
- Default: "https://registry.npmjs.org"
The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")
npmTokenSecret
Optional
public readonly npmTokenSecret: string;
- Type: string
- Default: "NPM_TOKEN"
GitHub secret which contains the NPM token to use when publishing packages.
outdir
Optional
public readonly outdir: string;
- Type: string
- Default: "."
The root directory of the project. Relative to this directory, all files are synthesized.
If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
package
Optional
public readonly package: boolean;
- Type: boolean
- Default: true
Defines a package
task that will produce an npm tarball under the artifacts directory (e.g. dist
).
packageManager
Optional
public readonly packageManager: NodePackageManager;
- Type: projen.javascript.NodePackageManager
- Default: NodePackageManager.YARN_CLASSIC
The Node Package Manager used to execute scripts.
packageName
Optional
public readonly packageName: string;
- Type: string
- Default: defaults to project name
The "name" in package.json.
parent
Optional
public readonly parent: Project;
- Type: projen.Project
The parent project, if this project is part of a bigger project.
peerDependencyOptions
Optional
public readonly peerDependencyOptions: PeerDependencyOptions;
- Type: projen.javascript.PeerDependencyOptions
Options for peerDeps
.
peerDeps
Optional
public readonly peerDeps: string[];
- Type: string[]
- Default: []
Peer dependencies for this module.
Dependencies listed here are required to
be installed (and satisfied) by the consumer of this library. Using peer
dependencies allows you to ensure that only a single module of a certain
library exists in the node_modules
tree of your consumers.
Note that prior to npm@7, peer dependencies are not automatically installed, which means that adding peer dependencies to a library will be a breaking change for your customers.
Unless peerDependencyOptions.pinnedDevDependency
is disabled (it is
enabled by default), projen will automatically add a dev dependency with a
pinned version for each peer dependency. This will ensure that you build &
test your module against the lowest peer version required.
pnpmVersion
Optional
public readonly pnpmVersion: string;
- Type: string
- Default: "7"
The version of PNPM to use if using PNPM as a package manager.
postBuildSteps
Optional
public readonly postBuildSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
- Default: []
Steps to execute after build as part of the release workflow.
prerelease
Optional
public readonly prerelease: string;
- Type: string
- Default: normal semantic versions
Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").
prettier
Optional
public readonly prettier: boolean;
- Type: boolean
- Default: false
Setup prettier.
prettierOptions
Optional
public readonly prettierOptions: PrettierOptions;
- Type: projen.javascript.PrettierOptions
- Default: default options
Prettier options.
~~projectType
~~Optional
- Deprecated: no longer supported at the base project level
public readonly projectType: ProjectType;
- Type: projen.ProjectType
- Default: ProjectType.UNKNOWN
Which type of project this is (library/app).
projenCommand
Optional
public readonly projenCommand: string;
- Type: string
- Default: "npx projen"
The shell command to use in order to run the projen CLI.
Can be used to customize in special environments.
projenCredentials
Optional
public readonly projenCredentials: GithubCredentials;
- Type: projen.github.GithubCredentials
- Default: use a personal access token named PROJEN_GITHUB_TOKEN
Choose a method of providing GitHub API access for projen workflows.
projenDevDependency
Optional
public readonly projenDevDependency: boolean;
- Type: boolean
- Default: true if not a subproject
Indicates of "projen" should be installed as a devDependency.
projenrcJs
Optional
public readonly projenrcJs: boolean;
- Type: boolean
- Default: true if projenrcJson is false
Generate (once) .projenrc.js (in JavaScript). Set to false
in order to disable .projenrc.js generation.
projenrcJson
Optional
public readonly projenrcJson: boolean;
- Type: boolean
- Default: false
Generate (once) .projenrc.json (in JSON). Set to false
in order to disable .projenrc.json generation.
projenrcJsonOptions
Optional
public readonly projenrcJsonOptions: ProjenrcJsonOptions;
- Type: projen.ProjenrcJsonOptions
- Default: default options
Options for .projenrc.json.
projenrcJsOptions
Optional
public readonly projenrcJsOptions: ProjenrcOptions;
- Type: projen.javascript.ProjenrcOptions
- Default: default options
Options for .projenrc.js.
projenrcTs
Optional
public readonly projenrcTs: boolean;
- Type: boolean
- Default: false
Use TypeScript for your projenrc file (.projenrc.ts
).
projenrcTsOptions
Optional
public readonly projenrcTsOptions: ProjenrcOptions;
- Type: projen.typescript.ProjenrcOptions
Options for .projenrc.ts.
~~projenTokenSecret
~~Optional
- Deprecated: use
projenCredentials
public readonly projenTokenSecret: string;
- Type: string
- Default: "PROJEN_GITHUB_TOKEN"
The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
This token needs to have the repo
, workflows
and packages
scope.
projenVersion
Optional
public readonly projenVersion: string;
- Type: string
- Default: Defaults to the latest version.
Version of projen to install.
publishDryRun
Optional
public readonly publishDryRun: boolean;
- Type: boolean
- Default: false
Instead of actually publishing to package managers, just print the publishing command.
publishTasks
Optional
public readonly publishTasks: boolean;
- Type: boolean
- Default: false
Define publishing tasks that can be executed manually as well as workflows.
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
pullRequestTemplate
Optional
public readonly pullRequestTemplate: boolean;
- Type: boolean
- Default: true
Include a GitHub pull request template.
pullRequestTemplateContents
Optional
public readonly pullRequestTemplateContents: string[];
- Type: string[]
- Default: default content
The contents of the pull request template.
readme
Optional
public readonly readme: SampleReadmeProps;
- Type: projen.SampleReadmeProps
- Default: { filename: 'README.md', contents: '# replace this' }
The README setup.
releasableCommits
Optional
public readonly releasableCommits: ReleasableCommits;
- Type: projen.ReleasableCommits
- Default: ReleasableCommits.everyCommit()
Find commits that should be considered releasable Used to decide if a release is required.
release
Optional
public readonly release: boolean;
- Type: boolean
- Default: true (false for subprojects)
Add release management to this project.
releaseBranches
Optional
public readonly releaseBranches: {[ key: string ]: BranchOptions};
- Type: {[ key: string ]: projen.release.BranchOptions}
- Default: no additional branches are used for release. you can use
addBranch()
to add additional branches.
Defines additional release branches.
A workflow will be created for each
release branch which will publish releases from commits in this branch.
Each release branch must be assigned a major version number which is used
to enforce that versions published from that branch always use that major
version. If multiple branches are used, the majorVersion
field must also
be provided for the default branch.
~~releaseEveryCommit
~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.continuous()
instead
public readonly releaseEveryCommit: boolean;
- Type: boolean
- Default: true
Automatically release new versions every commit to one of branches in releaseBranches
.
releaseFailureIssue
Optional
public readonly releaseFailureIssue: boolean;
- Type: boolean
- Default: false
Create a github issue on every failed publishing task.
releaseFailureIssueLabel
Optional
public readonly releaseFailureIssueLabel: string;
- Type: string
- Default: "failed-release"
The label to apply to issues indicating publish failures.
Only applies if releaseFailureIssue
is true.
~~releaseSchedule
~~Optional
- Deprecated: Use
releaseTrigger: ReleaseTrigger.scheduled()
instead
public readonly releaseSchedule: string;
- Type: string
- Default: no scheduled releases
CRON schedule to trigger new releases.
releaseTagPrefix
Optional
public readonly releaseTagPrefix: string;
- Type: string
- Default: "v"
Automatically add the given prefix to release tags.
Useful if you are releasing on multiple branches with overlapping version numbers. Note: this prefix is used to detect the latest tagged version when bumping, so if you change this on a project with an existing version history, you may need to manually tag your latest release with the new prefix.
releaseToNpm
Optional
public readonly releaseToNpm: boolean;
- Type: boolean
- Default: false
Automatically release to npm when new versions are introduced.
releaseTrigger
Optional
public readonly releaseTrigger: ReleaseTrigger;
- Type: projen.release.ReleaseTrigger
- Default: Continuous releases (
ReleaseTrigger.continuous()
)
The release trigger to use.
~~releaseWorkflow
~~Optional
- Deprecated: see
release
.
public readonly releaseWorkflow: boolean;
- Type: boolean
- Default: true if not a subproject
DEPRECATED: renamed to release
.
releaseWorkflowName
Optional
public readonly releaseWorkflowName: string;
- Type: string
- Default: "release"
The name of the default release workflow.
releaseWorkflowSetupSteps
Optional
public readonly releaseWorkflowSetupSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
A set of workflow steps to execute in order to setup the workflow container.
renovatebot
Optional
public readonly renovatebot: boolean;
- Type: boolean
- Default: false
Use renovatebot to handle dependency upgrades.
renovatebotOptions
Optional
public readonly renovatebotOptions: RenovatebotOptions;
- Type: projen.RenovatebotOptions
- Default: default options
Options for renovatebot.
repository
Optional
public readonly repository: string;
- Type: string
The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repositoryDirectory
Optional
public readonly repositoryDirectory: string;
- Type: string
If the package.json for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives.
sampleCode
Optional
public readonly sampleCode: boolean;
- Type: boolean
- Default: true
Generate one-time sample in src/
and test/
if there are no files there.
scopedPackagesOptions
Optional
public readonly scopedPackagesOptions: ScopedPackagesOptions[];
- Type: projen.javascript.ScopedPackagesOptions[]
- Default: fetch all scoped packages from the public npm registry
Options for privately hosted scoped packages.
~~scripts
~~Optional
- Deprecated: use
project.addTask()
orpackage.setScript()
public readonly scripts: {[ key: string ]: string};
- Type: {[ key: string ]: string}
- Default: {}
npm scripts to include.
If a script has the same name as a standard script, the standard script will be overwritten. Also adds the script as a task.
srcdir
Optional
public readonly srcdir: string;
- Type: string
- Default: "src"
Typescript sources directory.
stability
Optional
public readonly stability: string;
- Type: string
Package's Stability.
stale
Optional
public readonly stale: boolean;
- Type: boolean
- Default: false
Auto-close of stale issues and pull request.
See staleOptions
for options.
staleOptions
Optional
public readonly staleOptions: StaleOptions;
- Type: projen.github.StaleOptions
- Default: see defaults in
StaleOptions
Auto-close stale issues and pull requests.
To disable set stale
to false
.
testdir
Optional
public readonly testdir: string;
- Type: string
- Default: "test"
Jest tests directory.
Tests files should be named xxx.test.ts
.
If this directory is under srcdir
(e.g. src/test
, src/__tests__
),
then tests are going to be compiled into lib/
and executed as javascript.
If the test directory is outside of src
, then we configure jest to
compile the code in-memory.
tsconfig
Optional
public readonly tsconfig: TypescriptConfigOptions;
- Type: projen.javascript.TypescriptConfigOptions
- Default: default options
Custom TSConfig.
tsconfigDev
Optional
public readonly tsconfigDev: TypescriptConfigOptions;
- Type: projen.javascript.TypescriptConfigOptions
- Default: use the production tsconfig options
Custom tsconfig options for the development tsconfig.json file (used for testing).
tsconfigDevFile
Optional
public readonly tsconfigDevFile: string;
- Type: string
- Default: "tsconfig.dev.json"
The name of the development tsconfig.json file.
tsJestOptions
Optional
public readonly tsJestOptions: TsJestOptions;
- Type: projen.typescript.TsJestOptions
Options for ts-jest.
typescriptVersion
Optional
public readonly typescriptVersion: string;
- Type: string
- Default: "latest"
TypeScript version to use.
NOTE: Typescript is not semantically versioned and should remain on the
same minor, so we recommend using a ~
dependency (e.g. ~1.2.3
).
versionrcOptions
Optional
public readonly versionrcOptions: {[ key: string ]: any};
- Type: {[ key: string ]: any}
- Default: standard configuration applicable for GitHub repositories
Custom configuration used when creating changelog with standard-version package.
Given values either append to default configuration or overwrite values in it.
vscode
Optional
public readonly vscode: boolean;
- Type: boolean
- Default: true
Enable VSCode integration.
Enabled by default for root projects. Disabled for non-root projects.
workflowBootstrapSteps
Optional
public readonly workflowBootstrapSteps: JobStep[];
- Type: projen.github.workflows.JobStep[]
- Default: "yarn install --frozen-lockfile && yarn projen"
Workflow steps to use in order to bootstrap this repo.
workflowContainerImage
Optional
public readonly workflowContainerImage: string;
- Type: string
- Default: default image
Container image to use for GitHub workflows.
workflowGitIdentity
Optional
public readonly workflowGitIdentity: GitIdentity;
- Type: projen.github.GitIdentity
- Default: GitHub Actions
The git identity to use in workflows.
workflowNodeVersion
Optional
public readonly workflowNodeVersion: string;
- Type: string
- Default: same as
minNodeVersion
The node version to use in GitHub workflows.
workflowPackageCache
Optional
public readonly workflowPackageCache: boolean;
- Type: boolean
- Default: false
Enable Node.js package cache in GitHub workflows.
workflowRunsOn
Optional
public readonly workflowRunsOn: string[];
- Type: string[]
- Default: ["ubuntu-latest"]
Github Runner selection labels.
workflowRunsOnGroup
Optional
public readonly workflowRunsOnGroup: GroupRunnerOptions;
- Type: projen.GroupRunnerOptions
Github Runner Group selection options.
yarnBerryOptions
Optional
public readonly yarnBerryOptions: YarnBerryOptions;
- Type: projen.javascript.YarnBerryOptions
- Default: Yarn Berry v4 with all default options
Options for Yarn Berry.
WorkspaceConfig
Workspace configurations.
Initializer
import { WorkspaceConfig } from '@aws/pdk/monorepo'
const workspaceConfig: WorkspaceConfig = { ... }
Properties
Name | Type | Description |
---|---|---|
additionalPackages |
string[] |
List of additional package globs to include in the workspace. |
linkLocalWorkspaceBins |
boolean |
Links all local workspace project bins so they can be used for local development. |
yarn |
YarnWorkspaceConfig |
Yarn workspace config. |
additionalPackages
Optional
public readonly additionalPackages: string[];
- Type: string[]
List of additional package globs to include in the workspace.
All packages which are parented by the monorepo are automatically added to the workspace, but you can use this property to specify any additional paths to packages which may not be managed by projen.
linkLocalWorkspaceBins
Optional
public readonly linkLocalWorkspaceBins: boolean;
- Type: boolean
Links all local workspace project bins so they can be used for local development.
Package bins are only linked when installed from the registry, however it is very useful for monorepo development to also utilize these bin scripts. When enabled, this flag will recursively link all bins from packages.json files to the root node_modules/.bin.
yarn
Optional
public readonly yarn: YarnWorkspaceConfig;
- Type: YarnWorkspaceConfig
Yarn workspace config.
WorkspaceConfig
NX workspace configurations.
Initializer
import { Nx } from '@aws/pdk/monorepo'
const workspaceConfig: Nx.WorkspaceConfig = { ... }
Properties
Name | Type | Description |
---|---|---|
cacheableOperations |
string[] |
Defines the list of targets/operations that are cached by Nx. |
defaultBuildOutputs |
string[] |
No description. |
nonNativeHasher |
boolean |
Use non-native hasher for nx tasks. |
nxCloudReadOnlyAccessToken |
string |
Read only access token if enabling nx cloud. |
nxIgnore |
string[] |
List of patterns to include in the .nxignore file. |
cacheableOperations
Optional
public readonly cacheableOperations: string[];
- Type: string[]
- Default: ["build", "test"]
Defines the list of targets/operations that are cached by Nx.
defaultBuildOutputs
Optional
public readonly defaultBuildOutputs: string[];
- Type: string[]
nonNativeHasher
Optional
public readonly nonNativeHasher: boolean;
- Type: boolean
Use non-native hasher for nx tasks.
Sets NX_NON_NATIVE_HASHER=true
environment variable on nx based tasks.
nxCloudReadOnlyAccessToken
Optional
public readonly nxCloudReadOnlyAccessToken: string;
- Type: string
Read only access token if enabling nx cloud.
nxIgnore
Optional
public readonly nxIgnore: string[];
- Type: string[]
List of patterns to include in the .nxignore file.
YarnWorkspaceConfig
Yarn related workspace config.
Initializer
import { YarnWorkspaceConfig } from '@aws/pdk/monorepo'
const yarnWorkspaceConfig: YarnWorkspaceConfig = { ... }
Properties
Name | Type | Description |
---|---|---|
disableNoHoistBundled |
boolean |
Disable automatically applying noHoist logic for all sub-project "bundledDependencies". |
noHoist |
string[] |
List of package globs to exclude from hoisting in the workspace. |
disableNoHoistBundled
Optional
public readonly disableNoHoistBundled: boolean;
- Type: boolean
- Default: false
Disable automatically applying noHoist
logic for all sub-project "bundledDependencies".
noHoist
Optional
public readonly noHoist: string[];
- Type: string[]
List of package globs to exclude from hoisting in the workspace.
Protocols
IInput
- Implemented By: aws/pdk/monorepo.Nx.IInput
Properties
Name | Type | Description |
---|---|---|
env |
string |
No description. |
fileset |
string |
No description. |
runtime |
string |
No description. |
env
Optional
public readonly env: string;
- Type: string
fileset
Optional
public readonly fileset: string;
- Type: string
runtime
Optional
public readonly runtime: string;
- Type: string
INxAffectedConfig
- Implemented By: aws/pdk/monorepo.Nx.INxAffectedConfig
Default options for nx affected
.
Properties
Name | Type | Description |
---|---|---|
defaultBase |
string |
Default based branch used by affected commands. |
defaultBase
Optional
public readonly defaultBase: string;
- Type: string
Default based branch used by affected commands.
INxProjectCore
- Implemented By: MonorepoJavaProject, MonorepoPythonProject, MonorepoTsProject, NxConfigurator, INxProjectCore
Interface that all NXProject implementations should implement.
Methods
Name | Description |
---|---|
addImplicitDependency |
Create an implicit dependency between two Projects. |
addJavaDependency |
Adds a dependency between two Java Projects in the monorepo. |
addNxRunManyTask |
Add project task that executes npx nx run-many ... style command. |
addPythonPoetryDependency |
Adds a dependency between two Python Projects in the monorepo. |
composeNxRunManyCommand |
Helper to format npx nx run-many ... style command. |
execNxRunManyCommand |
Helper to format npx nx run-many ... style command execution in package manager. |
addImplicitDependency
public addImplicitDependency(dependent: Project, dependee: string | Project): void
Create an implicit dependency between two Projects.
This is typically used in polygot repos where a Typescript project wants a build dependency on a Python project as an example.
dependent
Required
- Type: projen.Project
project you want to have the dependency.
dependee
Required
- Type: string | projen.Project
project you wish to depend on.
addJavaDependency
public addJavaDependency(dependent: JavaProject, dependee: JavaProject): void
Adds a dependency between two Java Projects in the monorepo.
dependent
Required
- Type: projen.java.JavaProject
project you want to have the dependency.
dependee
Required
- Type: projen.java.JavaProject
project you wish to depend on.
addNxRunManyTask
public addNxRunManyTask(name: string, options: RunManyOptions): Task
Add project task that executes npx nx run-many ...
style command.
name
Required
- Type: string
task name.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
options.
addPythonPoetryDependency
public addPythonPoetryDependency(dependent: PythonProject, dependee: PythonProject): void
Adds a dependency between two Python Projects in the monorepo.
The dependent must have Poetry enabled.
dependent
Required
- Type: projen.python.PythonProject
project you want to have the dependency (must be a Poetry Python Project).
dependee
Required
- Type: projen.python.PythonProject
project you wish to depend on.
composeNxRunManyCommand
public composeNxRunManyCommand(options: RunManyOptions): string[]
Helper to format npx nx run-many ...
style command.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
execNxRunManyCommand
public execNxRunManyCommand(options: RunManyOptions): string
Helper to format npx nx run-many ...
style command execution in package manager.
options
Required
- Type: aws/pdk/monorepo.Nx.RunManyOptions
Properties
Name | Type | Description |
---|---|---|
nx |
NxWorkspace |
Return the NxWorkspace instance. |
nx
Required
public readonly nx: NxWorkspace;
- Type: NxWorkspace
Return the NxWorkspace instance.
This should be implemented using a getter.
IProjectTarget
- Implemented By: aws/pdk/monorepo.Nx.IProjectTarget
Project Target.
Properties
Name | Type | Description |
---|---|---|
dependsOn |
string | aws/pdk/monorepo.Nx.ITargetDependency[] |
List of Target Dependencies. |
executor |
string |
The function that Nx will invoke when you run this target. |
inputs |
string | aws/pdk/monorepo.Nx.IInput[] |
List of inputs to hash for cache key, relative to the root of the monorepo. |
options |
any |
Contains whatever configuration properties the executor needs to run. |
outputs |
string[] |
List of outputs to cache, relative to the root of the monorepo. |
dependsOn
Optional
public readonly dependsOn: string | ITargetDependency[];
- Type: string | aws/pdk/monorepo.Nx.ITargetDependency[]
List of Target Dependencies.
executor
Optional
public readonly executor: string;
- Type: string
The function that Nx will invoke when you run this target.
inputs
Optional
public readonly inputs: string | IInput[];
- Type: string | aws/pdk/monorepo.Nx.IInput[]
List of inputs to hash for cache key, relative to the root of the monorepo.
note: must start with leading /
options
Optional
public readonly options: any;
- Type: any
Contains whatever configuration properties the executor needs to run.
outputs
Optional
public readonly outputs: string[];
- Type: string[]
List of outputs to cache, relative to the root of the monorepo.
note: must start with leading /
ITargetDependency
- Implemented By: aws/pdk/monorepo.Nx.ITargetDependency
Represents an NX Target Dependency.
Properties
Name | Type | Description |
---|---|---|
projects |
aws/pdk/monorepo.Nx.TargetDependencyProject |
Target dependencies. |
target |
string |
Projen target i.e: build, test, etc. |
projects
Required
public readonly projects: TargetDependencyProject;
- Type: aws/pdk/monorepo.Nx.TargetDependencyProject
Target dependencies.
target
Required
public readonly target: string;
- Type: string
Projen target i.e: build, test, etc.
IWorkspaceLayout
- Implemented By: aws/pdk/monorepo.Nx.IWorkspaceLayout
Where new apps + libs should be placed.
Properties
Name | Type | Description |
---|---|---|
appsDir |
string |
No description. |
libsDir |
string |
No description. |
appsDir
Required
public readonly appsDir: string;
- Type: string
libsDir
Required
public readonly libsDir: string;
- Type: string
Enums
TargetDependencyProject
Supported enums for a TargetDependency.
Members
Name | Description |
---|---|
SELF |
Only rely on the package where the target is called. |
DEPENDENCIES |
Target relies on executing the target against all dependencies first. |
SELF
Only rely on the package where the target is called.
This is usually done for test like targets where you only want to run unit tests on the target packages without testing all dependent packages.
DEPENDENCIES
Target relies on executing the target against all dependencies first.
This is usually done for build like targets where you want to build all dependant projects first.