@Stability(value=Experimental) public static final class NodePackageOptions.Builder extends Object implements software.amazon.jsii.Builder<NodePackageOptions>
NodePackageOptions| Constructor and Description |
|---|
Builder() |
@Stability(value=Experimental) public NodePackageOptions.Builder allowLibraryDependencies(Boolean allowLibraryDependencies)
NodePackageOptions.getAllowLibraryDependencies()allowLibraryDependencies - Allow the project to include `peerDependencies` and `bundledDependencies`.
This is normally only allowed for libraries. For apps, there's no meaning
for specifying these.this@Stability(value=Experimental) public NodePackageOptions.Builder authorEmail(String authorEmail)
NodePackageOptions.getAuthorEmail()authorEmail - Author's e-mail.this@Stability(value=Experimental) public NodePackageOptions.Builder authorName(String authorName)
NodePackageOptions.getAuthorName()authorName - Author's name.this@Stability(value=Experimental) public NodePackageOptions.Builder authorOrganization(Boolean authorOrganization)
NodePackageOptions.getAuthorOrganization()authorOrganization - Author's Organization.this@Stability(value=Experimental) public NodePackageOptions.Builder authorUrl(String authorUrl)
NodePackageOptions.getAuthorUrl()authorUrl - Author's URL / Website.this@Stability(value=Experimental) public NodePackageOptions.Builder autoDetectBin(Boolean autoDetectBin)
NodePackageOptions.getAutoDetectBin()autoDetectBin - Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.this@Stability(value=Experimental) public NodePackageOptions.Builder bin(Map<String,String> bin)
NodePackageOptions.getBin()bin - 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.this@Stability(value=Experimental) public NodePackageOptions.Builder bundledDeps(List<String> bundledDeps)
NodePackageOptions.getBundledDeps()bundledDeps - 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.
this@Stability(value=Experimental) public NodePackageOptions.Builder codeArtifactOptions(CodeArtifactOptions codeArtifactOptions)
NodePackageOptions.getCodeArtifactOptions()codeArtifactOptions - Options for publishing npm package to AWS CodeArtifact.this@Stability(value=Experimental) public NodePackageOptions.Builder deps(List<String> deps)
NodePackageOptions.getDeps()deps - 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.this@Stability(value=Experimental) public NodePackageOptions.Builder description(String description)
NodePackageOptions.getDescription()description - 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-descriptionthis@Stability(value=Experimental) public NodePackageOptions.Builder devDeps(List<String> devDeps)
NodePackageOptions.getDevDeps()devDeps - 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.
this@Stability(value=Experimental) public NodePackageOptions.Builder entrypoint(String entrypoint)
NodePackageOptions.getEntrypoint()entrypoint - Module entrypoint (`main` in `package.json`).
Set to an empty string to not include main in your package.jsonthis@Stability(value=Experimental) public NodePackageOptions.Builder homepage(String homepage)
NodePackageOptions.getHomepage()homepage - Package's Homepage / Website.this@Stability(value=Experimental) public NodePackageOptions.Builder keywords(List<String> keywords)
NodePackageOptions.getKeywords()keywords - Keywords to include in `package.json`.this@Stability(value=Experimental) public NodePackageOptions.Builder license(String license)
NodePackageOptions.getLicense()license - 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.this@Stability(value=Experimental) public NodePackageOptions.Builder licensed(Boolean licensed)
NodePackageOptions.getLicensed()licensed - Indicates if a license should be added.this@Stability(value=Experimental) public NodePackageOptions.Builder maxNodeVersion(String maxNodeVersion)
NodePackageOptions.getMaxNodeVersion()maxNodeVersion - Minimum node.js version to require via `engines` (inclusive).this@Stability(value=Experimental) public NodePackageOptions.Builder minNodeVersion(String minNodeVersion)
NodePackageOptions.getMinNodeVersion()minNodeVersion - Minimum Node.js version to require via package.json `engines` (inclusive).this@Stability(value=Experimental) public NodePackageOptions.Builder npmAccess(NpmAccess npmAccess)
NodePackageOptions.getNpmAccess()npmAccess - Access level of the npm package.this@Stability(value=Deprecated) @Deprecated public NodePackageOptions.Builder npmRegistry(String npmRegistry)
NodePackageOptions.getNpmRegistry()npmRegistry - The host name of the npm registry to publish to.
Cannot be set together with npmRegistryUrl.this@Stability(value=Experimental) public NodePackageOptions.Builder npmRegistryUrl(String npmRegistryUrl)
NodePackageOptions.getNpmRegistryUrl()npmRegistryUrl - The base URL of the npm package registry.
Must be a URL (e.g. start with "https://" or "http://")this@Stability(value=Experimental) public NodePackageOptions.Builder npmTokenSecret(String npmTokenSecret)
NodePackageOptions.getNpmTokenSecret()npmTokenSecret - GitHub secret which contains the NPM token to use when publishing packages.this@Stability(value=Experimental) public NodePackageOptions.Builder packageManager(NodePackageManager packageManager)
NodePackageOptions.getPackageManager()packageManager - The Node Package Manager used to execute scripts.this@Stability(value=Experimental) public NodePackageOptions.Builder packageName(String packageName)
NodePackageOptions.getPackageName()packageName - The "name" in package.json.this@Stability(value=Experimental) public NodePackageOptions.Builder peerDependencyOptions(PeerDependencyOptions peerDependencyOptions)
NodePackageOptions.getPeerDependencyOptions()peerDependencyOptions - Options for `peerDeps`.this@Stability(value=Experimental) public NodePackageOptions.Builder peerDeps(List<String> peerDeps)
NodePackageOptions.getPeerDeps()peerDeps - 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.
this@Stability(value=Experimental) public NodePackageOptions.Builder repository(String repository)
NodePackageOptions.getRepository()repository - The repository is the location where the actual code for your package lives.
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repositorythis@Stability(value=Experimental) public NodePackageOptions.Builder repositoryDirectory(String repositoryDirectory)
NodePackageOptions.getRepositoryDirectory()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@Stability(value=Experimental) public NodePackageOptions.Builder scripts(Map<String,String> scripts)
NodePackageOptions.getScripts()scripts - npm scripts to include.
If a script has the same name as a standard script,
the standard script will be overwritten.this@Stability(value=Experimental) public NodePackageOptions.Builder stability(String stability)
NodePackageOptions.getStability()stability - Package's Stability.this@Stability(value=Experimental) public NodePackageOptions build()
build in interface software.amazon.jsii.Builder<NodePackageOptions>NodePackageOptionsNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.