Interface GitHooksEnabledProjectOptions

Hierarchy

  • TypeScriptProjectOptions
    • GitHooksEnabledProjectOptions

Properties

allowLibraryDependencies? artifactsDirectory? authorEmail? authorName? authorOrganization? authorUrl? autoApproveOptions? autoApproveUpgrades? autoDetectBin? autoMerge? autoMergeOptions? bin? bugsEmail? bugsUrl? buildWorkflow? buildWorkflowTriggers? bundledDeps? bundlerOptions? clobber? codeArtifactOptions? codeCov? codeCovTokenSecret? commitGenerated? copyrightOwner? copyrightPeriod? debug? defaultReleaseBranch dependabot? dependabotOptions? deps? depsUpgrade? depsUpgradeOptions? description? devContainer? devDeps? disableTsconfig? disableTsconfigDev? docgen? docsDirectory? editorConfig? editorConfigOptions? entrypoint? entrypointTypes? eslint? eslintOptions? gitHooksManager? gitHooksManagerOptions? gitIgnoreOptions? gitOptions? github? githubOptions? gitignore? gitpod? homepage? jest? jestOptions? jsiiReleaseVersion? keywords? libdir? license? licensed? logging? majorVersion? maxNodeVersion? mergify? mergifyOptions? minMajorVersion? minNodeVersion? mutableBuild? name npmAccess? npmDistTag? npmIgnoreOptions? npmRegistry? npmRegistryUrl? npmTokenSecret? npmignore? npmignoreEnabled? outdir? package? packageManager? packageName? parent? peerDependencyOptions? peerDeps? pnpmVersion? postBuildSteps? prerelease? prettier? prettierOptions? projectType? projenCommand? projenCredentials? projenDevDependency? projenTokenSecret? projenVersion? projenrcJs? projenrcJsOptions? projenrcJson? projenrcJsonOptions? projenrcTs? projenrcTsOptions? publishDryRun? publishTasks? pullRequestTemplate? pullRequestTemplateContents? readme? releasableCommits? release? releaseBranches? releaseEveryCommit? releaseFailureIssue? releaseFailureIssueLabel? releaseSchedule? releaseTagPrefix? releaseToNpm? releaseTrigger? releaseWorkflow? releaseWorkflowName? releaseWorkflowSetupSteps? renovatebot? renovatebotOptions? repository? repositoryDirectory? sampleCode? scopedPackagesOptions? scripts? srcdir? stability? stale? staleOptions? testdir? tsconfig? tsconfigDev? tsconfigDevFile? typescriptVersion? versionrcOptions? vscode? workflowBootstrapSteps? workflowContainerImage? workflowGitIdentity? workflowNodeVersion? workflowPackageCache? workflowRunsOn?

Properties

allowLibraryDependencies?: boolean

Allow the project to include peerDependencies and bundledDependencies. This is normally only allowed for libraries. For apps, there's no meaning for specifying these.

Default

true
artifactsDirectory?: string

A directory which will contain build artifacts.

Default

"dist"
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?: AutoApproveOptions

Enable and configure the 'auto approve' workflow.

Default

- auto approve is disabled
autoApproveUpgrades?: boolean

Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).

Throw if set to true but autoApproveOptions are not defined.

Default

- true
autoDetectBin?: boolean

Automatically add all executables under the bin directory to your package.json file under the bin section.

Default

true
autoMerge?: boolean

Enable automatic merging on GitHub. Has no effect if github.mergify is set to false.

Default

true
autoMergeOptions?: AutoMergeOptions

Configure options for automatic merging on GitHub. Has no effect if github.mergify or autoMerge is set to false.

Default

  • see defaults in AutoMergeOptions
bin?: Record<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?: 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.

Default

- true if not a subproject
buildWorkflowTriggers?: Triggers

Build workflow triggers

Default

"{ pullRequest: {}, workflowDispatch: {} }"
bundledDeps?: 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?: BundlerOptions

Options for Bundler.

clobber?: boolean

Add a clobber task which resets the repo to origin.

Default

- true, but false for subprojects
codeArtifactOptions?: CodeArtifactOptions

Options for npm packages using AWS CodeArtifact. This is required if publishing packages to, or installing scoped packages from AWS CodeArtifact

Default

- undefined
codeCov?: boolean

Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v3 A secret is required for private repos. Configured with @codeCovTokenSecret

Default

false
codeCovTokenSecret?: string

Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories

Default

- if this option is not specified, only public repositories are supported
commitGenerated?: boolean

Whether to commit the managed files by default.

Default

true
copyrightOwner?: string

License copyright owner.

Default

  • defaults to the value of authorName or "" if authorName is undefined.
copyrightPeriod?: string

The copyright years to put in the LICENSE file.

Default

- current year
debug?: boolean

Printing out debug statement

Default

false
defaultReleaseBranch: string

The name of the main release branch.

Default

"main"
dependabot?: boolean

Use dependabot to handle dependency upgrades. Cannot be used in conjunction with depsUpgrade.

Default

false
dependabotOptions?: DependabotOptions

Options for dependabot.

Default

- default options
deps?: string[]

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.

Example

[ 'express', 'lodash', 'foo@^2' ]

Default

[]

Featured

depsUpgrade?: boolean

Use github workflows to handle dependency upgrades. Cannot be used in conjunction with dependabot.

Default

true
depsUpgradeOptions?: UpgradeDependenciesOptions

Options for UpgradeDependencies.

Default

- default options
description?: 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

Featured

devContainer?: boolean

Add a VSCode development environment (used for GitHub Codespaces)

Default

false
devDeps?: string[]

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.

Example

[ 'typescript', '@types/express' ]

Default

[]

Featured

disableTsconfig?: boolean

Do not generate a tsconfig.json file (used by jsii projects since tsconfig.json is generated by the jsii compiler).

Default

false
disableTsconfigDev?: boolean

Do not generate a tsconfig.dev.json file.

Default

false
docgen?: boolean

Docgen by Typedoc

Default

false
docsDirectory?: string

Docs directory

Default

"docs"
editorConfig?: boolean

Enable editorConfig

Default

true
editorConfigOptions?: EditorConfigOptions

EditorConfig options

entrypoint?: string

Module entrypoint (main in package.json)

Set to an empty string to not include main in your package.json

Default

"lib/index.js"
entrypointTypes?: string

The .d.ts file that includes the type declarations for this module.

Default

- .d.ts file derived from the project's entrypoint (usually lib/index.d.ts)
eslint?: boolean

Setup eslint.

Default

true
eslintOptions?: EslintOptions

Eslint options

Default

- opinionated default options
gitHooksManager?: GitHooksManagerType

Setup gitHooksManager

Default

true
gitHooksManagerOptions?: HuskyOptions | LefthookOptions

gitHooksManagerEnabled options

Default

- default options
gitIgnoreOptions?: IgnoreFileOptions

Configuration options for .gitignore file

gitOptions?: GitOptions

Configuration options for git

github?: boolean

Enable GitHub integration.

Enabled by default for root projects. Disabled for non-root projects.

Default

true
githubOptions?: GitHubOptions

Options for GitHub integration

Default

- see GitHubOptions
gitignore?: string[]

Additional entries to .gitignore

gitpod?: boolean

Add a Gitpod development environment

Default

false
homepage?: string

Package's Homepage / Website

jest?: boolean

Setup jest unit tests

Default

true
jestOptions?: JestOptions

Jest options

Default

- default options
jsiiReleaseVersion?: string

Version requirement of publib which is used to publish modules to npm.

Default

"latest"
keywords?: string[]

Keywords to include in package.json.

libdir?: string

Typescript artifacts output directory

Default

"lib"
license?: string

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.

Default

"Apache-2.0"
licensed?: boolean

Indicates if a license should be added.

Default

true
logging?: LoggerOptions

Configure logging options such as verbosity.

Default

{}
majorVersion?: number

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.

Default

- Major version is not enforced.
maxNodeVersion?: string

Minimum node.js version to require via engines (inclusive).

Default

- no max
mergify?: boolean

Whether mergify should be enabled on this repository or not.

Default

true

Deprecated

use githubOptions.mergify instead

mergifyOptions?: MergifyOptions

Options for mergify

Default

- default options

Deprecated

use githubOptions.mergifyOptions instead

minMajorVersion?: number

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.

Default

- No minimum version is being enforced
minNodeVersion?: string

Minimum Node.js version to require via package.json engines (inclusive).

Default

- no "engines" specified
mutableBuild?: boolean

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.

Default

true
name: string

This is the name of your project.

Default

$BASEDIR

Featured

npmAccess?: NpmAccess

Access level of the npm package.

Default

  • for scoped packages (e.g. foo@bar), the default is NpmAccess.RESTRICTED, for non-scoped packages, the default is NpmAccess.PUBLIC.
npmDistTag?: string

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.

Default

"latest"
npmIgnoreOptions?: IgnoreFileOptions

Configuration options for .npmignore file

npmRegistry?: string

The host name of the npm registry to publish to. Cannot be set together with npmRegistryUrl.

Deprecated

use npmRegistryUrl instead

npmRegistryUrl?: string

The base URL of the npm package registry.

Must be a URL (e.g. start with "https://" or "http://")

Default

"https://registry.npmjs.org"
npmTokenSecret?: string

GitHub secret which contains the NPM token to use when publishing packages.

Default

"NPM_TOKEN"
npmignore?: string[]

Additional entries to .npmignore.

Deprecated

  • use project.addPackageIgnore
npmignoreEnabled?: boolean

Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs.

Default

true
outdir?: string

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 sub-projects.

Default

"."
package?: boolean

Defines a package task that will produce an npm tarball under the artifacts directory (e.g. dist).

Default

true
packageManager?: NodePackageManager

The Node Package Manager used to execute scripts

Default

NodePackageManager.YARN
packageName?: string

The "name" in package.json

Default

- defaults to project name

Featured

parent?: Project

The parent project, if this project is part of a bigger project.

peerDependencyOptions?: PeerDependencyOptions

Options for peerDeps.

peerDeps?: string[]

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.

Default

[]
pnpmVersion?: string

The version of PNPM to use if using PNPM as a package manager.

Default

"7"
postBuildSteps?: JobStep[]

Steps to execute after build as part of the release workflow.

Default

[]
prerelease?: string

Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre").

Default

- normal semantic versions
prettier?: boolean

Setup prettier.

Default

false
prettierOptions?: PrettierOptions

Prettier options

Default

- default options
projectType?: ProjectType

Which type of project this is (library/app).

Default

ProjectType.UNKNOWN

Deprecated

no longer supported at the base project level

projenCommand?: string

The shell command to use in order to run the projen CLI.

Can be used to customize in special environments.

Default

"npx projen"
projenCredentials?: GithubCredentials

Choose a method of providing GitHub API access for projen workflows.

Default

- use a personal access token named PROJEN_GITHUB_TOKEN
projenDevDependency?: boolean

Indicates of "projen" should be installed as a devDependency.

Default

true
projenTokenSecret?: string

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.

Default

"PROJEN_GITHUB_TOKEN"

Deprecated

use projenCredentials

projenVersion?: string

Version of projen to install.

Default

- Defaults to the latest version.
projenrcJs?: boolean

Generate (once) .projenrc.js (in JavaScript). Set to false in order to disable .projenrc.js generation.

Default

- true if projenrcJson is false
projenrcJsOptions?: ProjenrcOptions

Options for .projenrc.js

Default

- default options
projenrcJson?: boolean

Generate (once) .projenrc.json (in JSON). Set to false in order to disable .projenrc.json generation.

Default

false
projenrcJsonOptions?: ProjenrcJsonOptions

Options for .projenrc.json

Default

- default options
projenrcTs?: boolean

Use TypeScript for your projenrc file (.projenrc.ts).

Default

false

Pjnew

true

projenrcTsOptions?: ProjenrcOptions

Options for .projenrc.ts

publishDryRun?: boolean

Instead of actually publishing to package managers, just print the publishing command.

Default

false
publishTasks?: boolean

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.

Default

false
pullRequestTemplate?: boolean

Include a GitHub pull request template.

Default

true
pullRequestTemplateContents?: string[]

The contents of the pull request template.

Default

- default content
readme?: SampleReadmeProps

The README setup.

Default

- { filename: 'README.md', contents: '# replace this' }

Example

"{ filename: 'readme.md', contents: '# title' }"
releasableCommits?: ReleasableCommits

Find commits that should be considered releasable Used to decide if a release is required.

Default

ReleasableCommits.everyCommit()
release?: boolean

Add release management to this project.

Default

- true (false for subprojects)
releaseBranches?: {
    [name: string]: BranchOptions;
}

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.

Type declaration

  • [name: string]: BranchOptions

Default

  • no additional branches are used for release. you can use addBranch() to add additional branches.
releaseEveryCommit?: boolean

Automatically release new versions every commit to one of branches in releaseBranches.

Default

true

Deprecated

Use releaseTrigger: ReleaseTrigger.continuous() instead

releaseFailureIssue?: boolean

Create a github issue on every failed publishing task.

Default

false
releaseFailureIssueLabel?: string

The label to apply to issues indicating publish failures. Only applies if releaseFailureIssue is true.

Default

"failed-release"
releaseSchedule?: string

CRON schedule to trigger new releases.

Default

- no scheduled releases

Deprecated

Use releaseTrigger: ReleaseTrigger.scheduled() instead

releaseTagPrefix?: string

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.

Default

"v"
releaseToNpm?: boolean

Automatically release to npm when new versions are introduced.

Default

false
releaseTrigger?: ReleaseTrigger

The release trigger to use.

Default

  • Continuous releases (ReleaseTrigger.continuous())
releaseWorkflow?: boolean

DEPRECATED: renamed to release.

Default

- true if not a subproject

Deprecated

see release.

releaseWorkflowName?: string

The name of the default release workflow.

Default

"Release"
releaseWorkflowSetupSteps?: JobStep[]

A set of workflow steps to execute in order to setup the workflow container.

renovatebot?: boolean

Use renovatebot to handle dependency upgrades.

Default

false
renovatebotOptions?: RenovatebotOptions

Options for renovatebot.

Default

- default options
repository?: 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?: 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.

Default

true
scopedPackagesOptions?: ScopedPackagesOptions[]

Options for privately hosted scoped packages

Default

- fetch all scoped packages from the public npm registry
scripts?: {
    [name: string]: string;
}

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.

Type declaration

  • [name: string]: string

Default

{}

Deprecated

use project.addTask() or package.setScript()

srcdir?: string

Typescript sources directory.

Default

"src"
stability?: string

Package's Stability

stale?: boolean

Auto-close of stale issues and pull request. See staleOptions for options.

Default

false
staleOptions?: StaleOptions

Auto-close stale issues and pull requests. To disable set stale to false.

Default

  • see defaults in StaleOptions
testdir?: string

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.

Default

"test"
tsconfig?: TypescriptConfigOptions

Custom TSConfig

Default

- default options
tsconfigDev?: TypescriptConfigOptions

Custom tsconfig options for the development tsconfig.json file (used for testing).

Default

- use the production tsconfig options
tsconfigDevFile?: string

The name of the development tsconfig.json file.

Default

"tsconfig.dev.json"
typescriptVersion?: string

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).

Default

"latest"
versionrcOptions?: Record<string, any>

Custom configuration used when creating changelog with standard-version package. Given values either append to default configuration or overwrite values in it.

Default

- standard configuration applicable for GitHub repositories
vscode?: boolean

Enable VSCode integration.

Enabled by default for root projects. Disabled for non-root projects.

Default

true
workflowBootstrapSteps?: JobStep[]

Workflow steps to use in order to bootstrap this repo.

Default

"yarn install --frozen-lockfile && yarn projen"
workflowContainerImage?: string

Container image to use for GitHub workflows.

Default

- default image
workflowGitIdentity?: GitIdentity

The git identity to use in workflows.

Default

- GitHub Actions
workflowNodeVersion?: string

The node version to use in GitHub workflows.

Default

  • same as minNodeVersion
workflowPackageCache?: boolean

Enable Node.js package cache in GitHub workflows.

Default

false
workflowRunsOn?: string[]

Github Runner selection labels

Default

["ubuntu-latest"]

Generated using TypeDoc