@Stability(value=Experimental) public static final class ReactProject.Builder extends Object implements software.amazon.jsii.Builder<ReactProject>
ReactProject.| Modifier and Type | Method and Description |
|---|---|
ReactProject.Builder |
allowLibraryDependencies(Boolean allowLibraryDependencies)
(experimental) Allow the project to include `peerDependencies` and `bundledDependencies`.
|
ReactProject.Builder |
antitamper(Boolean antitamper)
(experimental) Checks that after build there are no modified files on git.
|
ReactProject.Builder |
artifactsDirectory(String artifactsDirectory)
(experimental) A directory which will contain artifacts to be published to npm.
|
ReactProject.Builder |
authorEmail(String authorEmail)
(experimental) Author's e-mail.
|
ReactProject.Builder |
authorName(String authorName)
(experimental) Author's name.
|
ReactProject.Builder |
authorOrganization(Boolean authorOrganization)
(experimental) Author's Organization.
|
ReactProject.Builder |
authorUrl(String authorUrl)
(experimental) Author's URL / Website.
|
ReactProject.Builder |
autoApproveOptions(AutoApproveOptions autoApproveOptions)
(experimental) Enable and configure the 'auto approve' workflow.
|
ReactProject.Builder |
autoApproveProjenUpgrades(Boolean autoApproveProjenUpgrades)
(experimental) Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued).
|
ReactProject.Builder |
autoApproveUpgrades(Boolean autoApproveUpgrades)
(experimental) Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued).
|
ReactProject.Builder |
autoDetectBin(Boolean autoDetectBin)
(experimental) Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
|
ReactProject.Builder |
autoMergeOptions(AutoMergeOptions autoMergeOptions)
(experimental) Configure options for automatic merging on GitHub.
|
ReactProject.Builder |
bin(Map<String,String> bin)
(experimental) Binary programs vended with your module.
|
ReactProject |
build() |
ReactProject.Builder |
buildWorkflow(Boolean buildWorkflow)
(experimental) Define a GitHub workflow for building PRs.
|
ReactProject.Builder |
bundledDeps(List<String> bundledDeps)
(experimental) List of dependencies to bundle into this module.
|
ReactProject.Builder |
bundlerOptions(BundlerOptions bundlerOptions)
(experimental) Options for `Bundler`.
|
ReactProject.Builder |
clobber(Boolean clobber)
(experimental) Add a `clobber` task which resets the repo to origin.
|
ReactProject.Builder |
codeArtifactOptions(CodeArtifactOptions codeArtifactOptions)
(experimental) Options for publishing npm package to AWS CodeArtifact.
|
ReactProject.Builder |
codeCov(Boolean codeCov)
(experimental) Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos.
|
ReactProject.Builder |
codeCovTokenSecret(String codeCovTokenSecret)
(experimental) Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories.
|
ReactProject.Builder |
copyrightOwner(String copyrightOwner)
(experimental) License copyright owner.
|
ReactProject.Builder |
copyrightPeriod(String copyrightPeriod)
(experimental) The copyright years to put in the LICENSE file.
|
static ReactProject.Builder |
create() |
ReactProject.Builder |
defaultReleaseBranch(String defaultReleaseBranch)
(experimental) The name of the main release branch.
|
ReactProject.Builder |
dependabot(Boolean dependabot)
(experimental) Use dependabot to handle dependency upgrades.
|
ReactProject.Builder |
dependabotOptions(DependabotOptions dependabotOptions)
(experimental) Options for dependabot.
|
ReactProject.Builder |
deps(List<String> deps)
(experimental) Runtime dependencies of this module.
|
ReactProject.Builder |
depsUpgrade(Boolean depsUpgrade)
(experimental) Use github workflows to handle dependency upgrades.
|
ReactProject.Builder |
depsUpgradeOptions(UpgradeDependenciesOptions depsUpgradeOptions)
(experimental) Options for depsUpgrade.
|
ReactProject.Builder |
description(String description)
(experimental) The description is just a string that helps people understand the purpose of the package.
|
ReactProject.Builder |
devContainer(Boolean devContainer)
(experimental) Add a VSCode development environment (used for GitHub Codespaces).
|
ReactProject.Builder |
devDeps(List<String> devDeps)
(experimental) Build dependencies for this module.
|
ReactProject.Builder |
entrypoint(String entrypoint)
(experimental) Module entrypoint (`main` in `package.json`).
|
ReactProject.Builder |
github(Boolean github)
(experimental) Enable GitHub integration.
|
ReactProject.Builder |
githubOptions(GitHubOptions githubOptions)
(experimental) Options for GitHub integration.
|
ReactProject.Builder |
gitignore(List<String> gitignore)
(experimental) Additional entries to .gitignore.
|
ReactProject.Builder |
gitpod(Boolean gitpod)
(experimental) Add a Gitpod development environment.
|
ReactProject.Builder |
homepage(String homepage)
(experimental) Package's Homepage / Website.
|
ReactProject.Builder |
jest(Boolean jest)
(experimental) Setup jest unit tests.
|
ReactProject.Builder |
jestOptions(JestOptions jestOptions)
(experimental) Jest options.
|
ReactProject.Builder |
jsiiReleaseVersion(String jsiiReleaseVersion)
(experimental) Version requirement of `jsii-release` which is used to publish modules to npm.
|
ReactProject.Builder |
keywords(List<String> keywords)
(experimental) Keywords to include in `package.json`.
|
ReactProject.Builder |
license(String license)
(experimental) License's SPDX identifier.
|
ReactProject.Builder |
licensed(Boolean licensed)
(experimental) Indicates if a license should be added.
|
ReactProject.Builder |
logging(LoggerOptions logging)
(experimental) Configure logging options such as verbosity.
|
ReactProject.Builder |
majorVersion(Number majorVersion)
(experimental) Major version to release from the default branch.
|
ReactProject.Builder |
maxNodeVersion(String maxNodeVersion)
(experimental) Minimum node.js version to require via `engines` (inclusive).
|
ReactProject.Builder |
mergify(Boolean mergify)
Deprecated.
use `githubOptions.mergify` instead
|
ReactProject.Builder |
mergifyOptions(MergifyOptions mergifyOptions)
Deprecated.
use `githubOptions.mergifyOptions` instead
|
ReactProject.Builder |
minNodeVersion(String minNodeVersion)
(experimental) Minimum Node.js version to require via package.json `engines` (inclusive).
|
ReactProject.Builder |
mutableBuild(Boolean mutableBuild)
(experimental) Automatically update files modified during builds to pull-request branches.
|
ReactProject.Builder |
name(String name)
(experimental) This is the name of your project.
|
ReactProject.Builder |
npmAccess(NpmAccess npmAccess)
(experimental) Access level of the npm package.
|
ReactProject.Builder |
npmDistTag(String npmDistTag)
(experimental) The npmDistTag to use when publishing from the default branch.
|
ReactProject.Builder |
npmignore(List<String> npmignore)
Deprecated.
- use `project.addPackageIgnore`
|
ReactProject.Builder |
npmignoreEnabled(Boolean npmignoreEnabled)
(experimental) Defines an .npmignore file.
|
ReactProject.Builder |
npmRegistry(String npmRegistry)
Deprecated.
use `npmRegistryUrl` instead
|
ReactProject.Builder |
npmRegistryUrl(String npmRegistryUrl)
(experimental) The base URL of the npm package registry.
|
ReactProject.Builder |
npmTokenSecret(String npmTokenSecret)
(experimental) GitHub secret which contains the NPM token to use when publishing packages.
|
ReactProject.Builder |
outdir(String outdir)
(experimental) The root directory of the project.
|
ReactProject.Builder |
packageManager(NodePackageManager packageManager)
(experimental) The Node Package Manager used to execute scripts.
|
ReactProject.Builder |
packageName(String packageName)
(experimental) The "name" in package.json.
|
ReactProject.Builder |
parent(Project parent)
(experimental) The parent project, if this project is part of a bigger project.
|
ReactProject.Builder |
peerDependencyOptions(PeerDependencyOptions peerDependencyOptions)
(experimental) Options for `peerDeps`.
|
ReactProject.Builder |
peerDeps(List<String> peerDeps)
(experimental) Peer dependencies for this module.
|
ReactProject.Builder |
postBuildSteps(List<? extends JobStep> postBuildSteps)
(experimental) Steps to execute after build as part of the release workflow.
|
ReactProject.Builder |
prerelease(String prerelease)
(experimental) Bump versions from the default branch as pre-releases (e.g.
|
ReactProject.Builder |
projectType(ProjectType projectType)
Deprecated.
no longer supported at the base project level
|
ReactProject.Builder |
projenCommand(String projenCommand)
(experimental) The shell command to use in order to run the projen CLI.
|
ReactProject.Builder |
projenDevDependency(Boolean projenDevDependency)
(experimental) Indicates of "projen" should be installed as a devDependency.
|
ReactProject.Builder |
projenrcJs(Boolean projenrcJs)
(experimental) Generate (once) .projenrc.js (in JavaScript).
|
ReactProject.Builder |
projenrcJson(Boolean projenrcJson)
(experimental) Generate (once) .projenrc.json (in JSON).
|
ReactProject.Builder |
projenrcJsonOptions(ProjenrcOptions projenrcJsonOptions)
(experimental) Options for .projenrc.json.
|
ReactProject.Builder |
projenrcJsOptions(ProjenrcOptions projenrcJsOptions)
(experimental) Options for .projenrc.js.
|
ReactProject.Builder |
projenUpgradeAutoMerge(Boolean projenUpgradeAutoMerge)
Deprecated.
use `autoApproveProjenUpgrades`.
|
ReactProject.Builder |
projenUpgradeSchedule(List<String> projenUpgradeSchedule)
(experimental) Customize the projenUpgrade schedule in cron expression.
|
ReactProject.Builder |
projenUpgradeSecret(String projenUpgradeSecret)
(experimental) Periodically submits a pull request for projen upgrades (executes `yarn projen:upgrade`).
|
ReactProject.Builder |
projenVersion(String projenVersion)
(experimental) Version of projen to install.
|
ReactProject.Builder |
publishTasks(Boolean publishTasks)
(experimental) Define publishing tasks that can be executed manually as well as workflows.
|
ReactProject.Builder |
pullRequestTemplate(Boolean pullRequestTemplate)
(experimental) Include a GitHub pull request template.
|
ReactProject.Builder |
pullRequestTemplateContents(List<String> pullRequestTemplateContents)
(experimental) The contents of the pull request template.
|
ReactProject.Builder |
readme(SampleReadmeProps readme)
(experimental) The README setup.
|
ReactProject.Builder |
release(Boolean release)
(experimental) Add release management to this project.
|
ReactProject.Builder |
releaseBranches(Map<String,? extends BranchOptions> releaseBranches)
(experimental) Defines additional release branches.
|
ReactProject.Builder |
releaseEveryCommit(Boolean releaseEveryCommit)
Deprecated.
Use `releaseTrigger: ReleaseTrigger.continuous()` instead
|
ReactProject.Builder |
releaseFailureIssue(Boolean releaseFailureIssue)
(experimental) Create a github issue on every failed publishing task.
|
ReactProject.Builder |
releaseFailureIssueLabel(String releaseFailureIssueLabel)
(experimental) The label to apply to issues indicating publish failures.
|
ReactProject.Builder |
releaseSchedule(String releaseSchedule)
Deprecated.
Use `releaseTrigger: ReleaseTrigger.scheduled()` instead
|
ReactProject.Builder |
releaseTagPrefix(String releaseTagPrefix)
(experimental) Automatically add the given prefix to release tags.
|
ReactProject.Builder |
releaseToNpm(Boolean releaseToNpm)
(experimental) Automatically release to npm when new versions are introduced.
|
ReactProject.Builder |
releaseTrigger(ReleaseTrigger releaseTrigger)
(experimental) The release trigger to use.
|
ReactProject.Builder |
releaseWorkflow(Boolean releaseWorkflow)
Deprecated.
see `release`.
|
ReactProject.Builder |
releaseWorkflowName(String releaseWorkflowName)
(experimental) The name of the default release workflow.
|
ReactProject.Builder |
releaseWorkflowSetupSteps(List<? extends JobStep> releaseWorkflowSetupSteps)
(experimental) A set of workflow steps to execute in order to setup the workflow container.
|
ReactProject.Builder |
repository(String repository)
(experimental) The repository is the location where the actual code for your package lives.
|
ReactProject.Builder |
repositoryDirectory(String repositoryDirectory)
(experimental) 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.
|
ReactProject.Builder |
rewire(Map<String,? extends Object> rewire)
(experimental) Rewire webpack configuration.
|
ReactProject.Builder |
sampleCode(Boolean sampleCode)
(experimental) Generate one-time sample in `src/` and `public/` if there are no files there.
|
ReactProject.Builder |
scripts(Map<String,String> scripts)
(experimental) npm scripts to include.
|
ReactProject.Builder |
srcdir(String srcdir)
(experimental) Source directory.
|
ReactProject.Builder |
stability(String stability)
(experimental) Package's Stability.
|
ReactProject.Builder |
stale(Boolean stale)
(experimental) Auto-close of stale issues and pull request.
|
ReactProject.Builder |
staleOptions(StaleOptions staleOptions)
(experimental) Auto-close stale issues and pull requests.
|
ReactProject.Builder |
versionrcOptions(Map<String,? extends Object> versionrcOptions)
(experimental) Custom configuration used when creating changelog with standard-version package.
|
ReactProject.Builder |
vscode(Boolean vscode)
(experimental) Enable VSCode integration.
|
ReactProject.Builder |
workflowBootstrapSteps(List<? extends Object> workflowBootstrapSteps)
(experimental) Workflow steps to use in order to bootstrap this repo.
|
ReactProject.Builder |
workflowContainerImage(String workflowContainerImage)
(experimental) Container image to use for GitHub workflows.
|
ReactProject.Builder |
workflowGitIdentity(GitIdentity workflowGitIdentity)
(experimental) The git identity to use in workflows.
|
ReactProject.Builder |
workflowNodeVersion(String workflowNodeVersion)
(experimental) The node version to use in GitHub workflows.
|
ReactProject.Builder |
workflowRunsOn(List<String> workflowRunsOn)
(experimental) Github Runner selection labels.
|
@Stability(value=Experimental) public static ReactProject.Builder create()
ReactProject.Builder.@Stability(value=Experimental) public ReactProject.Builder name(String name)
Default: $BASEDIR
name - This is the name of your project. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder logging(LoggerOptions logging)
Default: {}
logging - Configure logging options such as verbosity. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder outdir(String outdir)
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: "."
outdir - The root directory of the project. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder parent(Project parent)
parent - The parent project, if this project is part of a bigger project. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder projenCommand(String projenCommand)
Can be used to customize in special environments.
Default: "npx projen"
projenCommand - The shell command to use in order to run the projen CLI. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder projenrcJson(Boolean projenrcJson)
Default: false
projenrcJson - Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder projenrcJsonOptions(ProjenrcOptions projenrcJsonOptions)
Default: - default options
projenrcJsonOptions - Options for .projenrc.json. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder autoApproveOptions(AutoApproveOptions autoApproveOptions)
Default: - auto approve is disabled
autoApproveOptions - Enable and configure the 'auto approve' workflow. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder autoMergeOptions(AutoMergeOptions autoMergeOptions)
Has no effect if
github.mergify is set to false.
Default: - see defaults in `AutoMergeOptions`
autoMergeOptions - Configure options for automatic merging on GitHub. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder clobber(Boolean clobber)
Default: true
clobber - Add a `clobber` task which resets the repo to origin. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder devContainer(Boolean devContainer)
Default: false
devContainer - Add a VSCode development environment (used for GitHub Codespaces). This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder github(Boolean github)
Enabled by default for root projects. Disabled for non-root projects.
Default: true
github - Enable GitHub integration. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder githubOptions(GitHubOptions githubOptions)
Default: - see GitHubOptions
githubOptions - Options for GitHub integration. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder gitpod(Boolean gitpod)
Default: false
gitpod - Add a Gitpod development environment. This parameter is required.this@Stability(value=Deprecated) @Deprecated public ReactProject.Builder mergify(Boolean mergify)
Default: true
mergify - Whether mergify should be enabled on this repository or not. This parameter is required.this@Stability(value=Deprecated) @Deprecated public ReactProject.Builder mergifyOptions(MergifyOptions mergifyOptions)
Default: - default options
mergifyOptions - Options for mergify. This parameter is required.this@Stability(value=Deprecated) @Deprecated public ReactProject.Builder projectType(ProjectType projectType)
Default: ProjectType.UNKNOWN
projectType - Which type of project this is (library/app). This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder readme(SampleReadmeProps readme)
Default: - { filename: 'README.md', contents: '# replace this' }
Example:
// Example automatically generated from non-compiling source. May contain errors.
"{ filename: 'readme.md', contents: '# title' }"
readme - The README setup. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder stale(Boolean stale)
See staleOptions for options.
Default: true
stale - Auto-close of stale issues and pull request. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder staleOptions(StaleOptions staleOptions)
To disable set stale to false.
Default: - see defaults in `StaleOptions`
staleOptions - Auto-close stale issues and pull requests. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder vscode(Boolean vscode)
Enabled by default for root projects. Disabled for non-root projects.
Default: true
vscode - Enable VSCode integration. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder allowLibraryDependencies(Boolean allowLibraryDependencies)
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
Default: true
allowLibraryDependencies - Allow the project to include `peerDependencies` and `bundledDependencies`. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder authorEmail(String authorEmail)
authorEmail - Author's e-mail. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder authorName(String authorName)
authorName - Author's name. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder authorOrganization(Boolean authorOrganization)
authorOrganization - Author's Organization. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder authorUrl(String authorUrl)
authorUrl - Author's URL / Website. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder autoDetectBin(Boolean autoDetectBin)
Default: true
autoDetectBin - Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder bin(Map<String,String> bin)
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.
bin - Binary programs vended with your module. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder bundledDeps(List<String> bundledDeps)
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.
bundledDeps - List of dependencies to bundle into this module. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder codeArtifactOptions(CodeArtifactOptions codeArtifactOptions)
Default: - undefined
codeArtifactOptions - Options for publishing npm package to AWS CodeArtifact. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder deps(List<String> deps)
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.
Default: []
Example:
// Example automatically generated from non-compiling source. May contain errors. [ 'express', 'lodash', 'foo@^2' ]
deps - Runtime dependencies of this module. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder description(String description)
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
description - The description is just a string that helps people understand the purpose of the package. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder devDeps(List<String> devDeps)
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.
Default: []
Example:
// Example automatically generated from non-compiling source. May contain errors. [ 'typescript', '@types/express' ]
devDeps - Build dependencies for this module. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder entrypoint(String entrypoint)
Set to an empty string to not include main in your package.json
Default: "lib/index.js"
entrypoint - Module entrypoint (`main` in `package.json`). This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder homepage(String homepage)
homepage - Package's Homepage / Website. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder keywords(List<String> keywords)
keywords - Keywords to include in `package.json`. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder license(String license)
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"
license - License's SPDX identifier. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder licensed(Boolean licensed)
Default: true
licensed - Indicates if a license should be added. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder maxNodeVersion(String maxNodeVersion)
Default: - no max
maxNodeVersion - Minimum node.js version to require via `engines` (inclusive). This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder minNodeVersion(String minNodeVersion)
Default: - no "engines" specified
minNodeVersion - Minimum Node.js version to require via package.json `engines` (inclusive). This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder npmAccess(NpmAccess npmAccess)
Default: - for scoped packages (e.g. `foo@bar`), the default is `NpmAccess.RESTRICTED`, for non-scoped packages, the default is `NpmAccess.PUBLIC`.
npmAccess - Access level of the npm package. This parameter is required.this@Stability(value=Deprecated) @Deprecated public ReactProject.Builder npmRegistry(String npmRegistry)
Cannot be set together with npmRegistryUrl.
npmRegistry - The host name of the npm registry to publish to. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder npmRegistryUrl(String npmRegistryUrl)
Must be a URL (e.g. start with "https://" or "http://")
Default: "https://registry.npmjs.org"
npmRegistryUrl - The base URL of the npm package registry. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder npmTokenSecret(String npmTokenSecret)
Default: "NPM_TOKEN"
npmTokenSecret - GitHub secret which contains the NPM token to use when publishing packages. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder packageManager(NodePackageManager packageManager)
Default: NodePackageManager.YARN
packageManager - The Node Package Manager used to execute scripts. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder packageName(String packageName)
Default: - defaults to project name
packageName - The "name" in package.json. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder peerDependencyOptions(PeerDependencyOptions peerDependencyOptions)
peerDependencyOptions - Options for `peerDeps`. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder peerDeps(List<String> peerDeps)
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: []
peerDeps - Peer dependencies for this module. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder repository(String repository)
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
repository - The repository is the location where the actual code for your package lives. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder repositoryDirectory(String repositoryDirectory)
repositoryDirectory - 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. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder scripts(Map<String,String> scripts)
If a script has the same name as a standard script, the standard script will be overwritten.
Default: {}
scripts - npm scripts to include. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder stability(String stability)
stability - Package's Stability. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder antitamper(Boolean antitamper)
Default: true
antitamper - Checks that after build there are no modified files on git. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder artifactsDirectory(String artifactsDirectory)
Default: "dist"
artifactsDirectory - A directory which will contain artifacts to be published to npm. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder jsiiReleaseVersion(String jsiiReleaseVersion)
Default: "latest"
jsiiReleaseVersion - Version requirement of `jsii-release` which is used to publish modules to npm. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder majorVersion(Number majorVersion)
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.
majorVersion - Major version to release from the default branch. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder npmDistTag(String npmDistTag)
To set the npm dist-tag for release branches, set the npmDistTag property
for each branch.
Default: "latest"
npmDistTag - The npmDistTag to use when publishing from the default branch. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder postBuildSteps(List<? extends JobStep> postBuildSteps)
Default: []
postBuildSteps - Steps to execute after build as part of the release workflow. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder prerelease(String prerelease)
Default: - normal semantic versions
prerelease - Bump versions from the default branch as pre-releases (e.g. "beta", "alpha", "pre"). This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder publishTasks(Boolean publishTasks)
Normally, publishing only happens within automated workflows. Enable this in order to create a publishing task for each publishing activity.
Default: false
publishTasks - Define publishing tasks that can be executed manually as well as workflows. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder releaseBranches(Map<String,? extends BranchOptions> releaseBranches)
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.
Default: - no additional branches are used for release. you can use `addBranch()` to add additional branches.
releaseBranches - Defines additional release branches. This parameter is required.this@Stability(value=Deprecated) @Deprecated public ReactProject.Builder releaseEveryCommit(Boolean releaseEveryCommit)
Default: true
releaseEveryCommit - Automatically release new versions every commit to one of branches in `releaseBranches`. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder releaseFailureIssue(Boolean releaseFailureIssue)
Default: false
releaseFailureIssue - Create a github issue on every failed publishing task. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder releaseFailureIssueLabel(String releaseFailureIssueLabel)
Only applies if releaseFailureIssue is true.
Default: "failed-release"
releaseFailureIssueLabel - The label to apply to issues indicating publish failures. This parameter is required.this@Stability(value=Deprecated) @Deprecated public ReactProject.Builder releaseSchedule(String releaseSchedule)
Default: - no scheduled releases
releaseSchedule - CRON schedule to trigger new releases. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder releaseTagPrefix(String releaseTagPrefix)
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: - no prefix
releaseTagPrefix - Automatically add the given prefix to release tags. Useful if you are releasing on multiple branches with overlapping version numbers. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder releaseTrigger(ReleaseTrigger releaseTrigger)
Default: - Continuous releases (`ReleaseTrigger.continuous()`)
releaseTrigger - The release trigger to use. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder releaseWorkflowName(String releaseWorkflowName)
Default: "Release"
releaseWorkflowName - The name of the default release workflow. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder releaseWorkflowSetupSteps(List<? extends JobStep> releaseWorkflowSetupSteps)
releaseWorkflowSetupSteps - A set of workflow steps to execute in order to setup the workflow container. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder versionrcOptions(Map<String,? extends Object> versionrcOptions)
Given values either append to default configuration or overwrite values in it.
Default: - standard configuration applicable for GitHub repositories
versionrcOptions - Custom configuration used when creating changelog with standard-version package. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder workflowContainerImage(String workflowContainerImage)
Default: - default image
workflowContainerImage - Container image to use for GitHub workflows. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder workflowRunsOn(List<String> workflowRunsOn)
Default: ["ubuntu-latest"]
workflowRunsOn - Github Runner selection labels. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder defaultReleaseBranch(String defaultReleaseBranch)
Default: "main"
defaultReleaseBranch - The name of the main release branch. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder autoApproveProjenUpgrades(Boolean autoApproveProjenUpgrades)
Throw if set to true but autoApproveOptions are not defined.
Default: false
autoApproveProjenUpgrades - Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder autoApproveUpgrades(Boolean autoApproveUpgrades)
Throw if set to true but autoApproveOptions are not defined.
Default: - true
autoApproveUpgrades - Automatically approve deps upgrade PRs, allowing them to be merged by mergify (if configued). This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder buildWorkflow(Boolean buildWorkflow)
Default: - true if not a subproject
buildWorkflow - Define a GitHub workflow for building PRs. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder bundlerOptions(BundlerOptions bundlerOptions)
bundlerOptions - Options for `Bundler`. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder codeCov(Boolean codeCov)
Default: false
codeCov - Define a GitHub workflow step for sending code coverage metrics to https://codecov.io/ Uses codecov/codecov-action@v1 A secret is required for private repos. Configured with @codeCovTokenSecret. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder codeCovTokenSecret(String codeCovTokenSecret)
Default: - if this option is not specified, only public repositories are supported
codeCovTokenSecret - Define the secret name for a specified https://codecov.io/ token A secret is required to send coverage for private repositories. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder copyrightOwner(String copyrightOwner)
Default: - defaults to the value of authorName or "" if `authorName` is undefined.
copyrightOwner - License copyright owner. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder copyrightPeriod(String copyrightPeriod)
Default: - current year
copyrightPeriod - The copyright years to put in the LICENSE file. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder dependabot(Boolean dependabot)
Cannot be used in conjunction with depsUpgrade.
Default: false
dependabot - Use dependabot to handle dependency upgrades. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder dependabotOptions(DependabotOptions dependabotOptions)
Default: - default options
dependabotOptions - Options for dependabot. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder depsUpgrade(Boolean depsUpgrade)
Cannot be used in conjunction with dependabot.
Default: true
depsUpgrade - Use github workflows to handle dependency upgrades. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder depsUpgradeOptions(UpgradeDependenciesOptions depsUpgradeOptions)
Default: - default options
depsUpgradeOptions - Options for depsUpgrade. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder gitignore(List<String> gitignore)
gitignore - Additional entries to .gitignore. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder jest(Boolean jest)
Default: true
jest - Setup jest unit tests. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder jestOptions(JestOptions jestOptions)
Default: - default options
jestOptions - Jest options. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder mutableBuild(Boolean mutableBuild)
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
mutableBuild - Automatically update files modified during builds to pull-request branches. This parameter is required.this@Stability(value=Deprecated) @Deprecated public ReactProject.Builder npmignore(List<String> npmignore)
npmignore - Additional entries to .npmignore. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder npmignoreEnabled(Boolean npmignoreEnabled)
Default: true
npmignoreEnabled - Defines an .npmignore file. Normally this is only needed for libraries that are packaged as tarballs. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder projenDevDependency(Boolean projenDevDependency)
Default: true
projenDevDependency - Indicates of "projen" should be installed as a devDependency. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder projenrcJs(Boolean projenrcJs)
Default: - true if projenrcJson is false
projenrcJs - Generate (once) .projenrc.js (in JavaScript). Set to `false` in order to disable .projenrc.js generation. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder projenrcJsOptions(ProjenrcOptions projenrcJsOptions)
Default: - default options
projenrcJsOptions - Options for .projenrc.js. This parameter is required.this@Stability(value=Deprecated) @Deprecated public ReactProject.Builder projenUpgradeAutoMerge(Boolean projenUpgradeAutoMerge)
Throw if set to true but autoApproveOptions are not defined.
Default: false
projenUpgradeAutoMerge - Automatically approve projen upgrade PRs, allowing them to be merged by mergify (if configued). This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder projenUpgradeSchedule(List<String> projenUpgradeSchedule)
Default: [ "0 6 * * *" ]
projenUpgradeSchedule - Customize the projenUpgrade schedule in cron expression. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder projenUpgradeSecret(String projenUpgradeSecret)
This setting is a GitHub secret name which contains a GitHub Access Token
with repo and workflow permissions.
This token is used to submit the upgrade pull request, which will likely include workflow updates.
To create a personal access token see https://github.com/settings/tokens
Default: - no automatic projen upgrade pull requests
projenUpgradeSecret - Periodically submits a pull request for projen upgrades (executes `yarn projen:upgrade`). This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder projenVersion(String projenVersion)
Default: - Defaults to the latest version.
projenVersion - Version of projen to install. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder pullRequestTemplate(Boolean pullRequestTemplate)
Default: true
pullRequestTemplate - Include a GitHub pull request template. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder pullRequestTemplateContents(List<String> pullRequestTemplateContents)
Default: - default content
pullRequestTemplateContents - The contents of the pull request template. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder release(Boolean release)
Default: - true (false for subprojects)
release - Add release management to this project. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder releaseToNpm(Boolean releaseToNpm)
Default: false
releaseToNpm - Automatically release to npm when new versions are introduced. This parameter is required.this@Stability(value=Deprecated) @Deprecated public ReactProject.Builder releaseWorkflow(Boolean releaseWorkflow)
Default: - true if not a subproject
releaseWorkflow - DEPRECATED: renamed to `release`. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder workflowBootstrapSteps(List<? extends Object> workflowBootstrapSteps)
Default: "yarn install --frozen-lockfile && yarn projen"
workflowBootstrapSteps - Workflow steps to use in order to bootstrap this repo. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder workflowGitIdentity(GitIdentity workflowGitIdentity)
Default: - GitHub Actions
workflowGitIdentity - The git identity to use in workflows. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder workflowNodeVersion(String workflowNodeVersion)
Default: - same as `minNodeVersion`
workflowNodeVersion - The node version to use in GitHub workflows. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder rewire(Map<String,? extends Object> rewire)
Use this property to override webpack configuration properties provided by create-react-app, without needing to eject.
This property will create a config-overrides.js file in your root directory,
which will contain the desired rewiring code.
To override the configuration, you can provide simple key value pairs. Keys take the form of js code directives that traverse to the desired property. Values should be JSON serializable objects.
For example, the following config:
rewire: { "module.unknownContextCritical": false }
Will translate to the following config-overrides.js file:
module.exports = function override(config, env) {
config.module.unknownContextCritical = false;
}
Default: - No rewired config.
rewire - Rewire webpack configuration. This parameter is required.thishttps://github.com/timarney/react-app-rewired@Stability(value=Experimental) public ReactProject.Builder sampleCode(Boolean sampleCode)
Default: true
sampleCode - Generate one-time sample in `src/` and `public/` if there are no files there. This parameter is required.this@Stability(value=Experimental) public ReactProject.Builder srcdir(String srcdir)
Default: "src"
srcdir - Source directory. This parameter is required.this@Stability(value=Experimental) public ReactProject build()
build in interface software.amazon.jsii.Builder<ReactProject>Copyright © 2021. All rights reserved.