@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-20T00:39:28.849Z") @Stability(value=Experimental) public interface NodePackageOptions extends software.amazon.jsii.JsiiSerializable
| Modifier and Type | Interface and Description |
|---|---|
static class |
NodePackageOptions.Builder
A builder for
NodePackageOptions |
static class |
NodePackageOptions.Jsii$Proxy
An implementation for
NodePackageOptions |
| Modifier and Type | Method and Description |
|---|---|
static NodePackageOptions.Builder |
builder() |
default Boolean |
getAllowLibraryDependencies()
(experimental) Allow the project to include `peerDependencies` and `bundledDependencies`.
|
default String |
getAuthorEmail()
(experimental) Author's e-mail.
|
default String |
getAuthorName()
(experimental) Author's name.
|
default Boolean |
getAuthorOrganization()
(experimental) Author's Organization.
|
default String |
getAuthorUrl()
(experimental) Author's URL / Website.
|
default Boolean |
getAutoDetectBin()
(experimental) Automatically add all executables under the `bin` directory to your `package.json` file under the `bin` section.
|
default Map<String,String> |
getBin()
(experimental) Binary programs vended with your module.
|
default List<String> |
getBundledDeps()
(experimental) List of dependencies to bundle into this module.
|
default CodeArtifactOptions |
getCodeArtifactOptions()
(experimental) Options for publishing npm package to AWS CodeArtifact.
|
default List<String> |
getDeps()
(experimental) Runtime dependencies of this module.
|
default String |
getDescription()
(experimental) The description is just a string that helps people understand the purpose of the package.
|
default List<String> |
getDevDeps()
(experimental) Build dependencies for this module.
|
default String |
getEntrypoint()
(experimental) Module entrypoint (`main` in `package.json`).
|
default String |
getHomepage()
(experimental) Package's Homepage / Website.
|
default List<String> |
getKeywords()
(experimental) Keywords to include in `package.json`.
|
default String |
getLicense()
(experimental) License's SPDX identifier.
|
default Boolean |
getLicensed()
(experimental) Indicates if a license should be added.
|
default String |
getMaxNodeVersion()
(experimental) Minimum node.js version to require via `engines` (inclusive).
|
default String |
getMinNodeVersion()
(experimental) Minimum Node.js version to require via package.json `engines` (inclusive).
|
default NpmAccess |
getNpmAccess()
(experimental) Access level of the npm package.
|
default String |
getNpmRegistry()
Deprecated.
use `npmRegistryUrl` instead
|
default String |
getNpmRegistryUrl()
(experimental) The base URL of the npm package registry.
|
default String |
getNpmTokenSecret()
(experimental) GitHub secret which contains the NPM token to use when publishing packages.
|
default NodePackageManager |
getPackageManager()
(experimental) The Node Package Manager used to execute scripts.
|
default String |
getPackageName()
(experimental) The "name" in package.json.
|
default PeerDependencyOptions |
getPeerDependencyOptions()
(experimental) Options for `peerDeps`.
|
default List<String> |
getPeerDeps()
(experimental) Peer dependencies for this module.
|
default String |
getRepository()
(experimental) The repository is the location where the actual code for your package lives.
|
default String |
getRepositoryDirectory()
(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.
|
default Map<String,String> |
getScripts()
(experimental) npm scripts to include.
|
default String |
getStability()
(experimental) Package's Stability.
|
@Stability(value=Experimental) @Nullable default Boolean getAllowLibraryDependencies()
This is normally only allowed for libraries. For apps, there's no meaning for specifying these.
Default: true
@Stability(value=Experimental) @Nullable default String getAuthorEmail()
@Stability(value=Experimental) @Nullable default String getAuthorName()
@Stability(value=Experimental) @Nullable default Boolean getAuthorOrganization()
@Stability(value=Experimental) @Nullable default String getAuthorUrl()
@Stability(value=Experimental) @Nullable default Boolean getAutoDetectBin()
Default: true
@Stability(value=Experimental) @Nullable default Map<String,String> getBin()
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.
@Stability(value=Experimental) @Nullable default List<String> getBundledDeps()
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.
@Stability(value=Experimental) @Nullable default CodeArtifactOptions getCodeArtifactOptions()
Default: - undefined
@Stability(value=Experimental) @Nullable default List<String> getDeps()
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' ]
@Stability(value=Experimental) @Nullable default String getDescription()
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
@Stability(value=Experimental) @Nullable default List<String> getDevDeps()
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' ]
@Stability(value=Experimental) @Nullable default String getEntrypoint()
Set to an empty string to not include main in your package.json
Default: "lib/index.js"
@Stability(value=Experimental) @Nullable default String getHomepage()
@Stability(value=Experimental) @Nullable default List<String> getKeywords()
@Stability(value=Experimental) @Nullable default String getLicense()
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"
@Stability(value=Experimental) @Nullable default Boolean getLicensed()
Default: true
@Stability(value=Experimental) @Nullable default String getMaxNodeVersion()
Default: - no max
@Stability(value=Experimental) @Nullable default String getMinNodeVersion()
Default: - no "engines" specified
@Stability(value=Experimental) @Nullable default NpmAccess getNpmAccess()
Default: - for scoped packages (e.g. `foo@bar`), the default is `NpmAccess.RESTRICTED`, for non-scoped packages, the default is `NpmAccess.PUBLIC`.
@Stability(value=Deprecated) @Deprecated @Nullable default String getNpmRegistry()
Cannot be set together with npmRegistryUrl.
@Stability(value=Experimental) @Nullable default String getNpmRegistryUrl()
Must be a URL (e.g. start with "https://" or "http://")
Default: "https://registry.npmjs.org"
@Stability(value=Experimental) @Nullable default String getNpmTokenSecret()
Default: "NPM_TOKEN"
@Stability(value=Experimental) @Nullable default NodePackageManager getPackageManager()
Default: NodePackageManager.YARN
@Stability(value=Experimental) @Nullable default String getPackageName()
Default: - defaults to project name
@Stability(value=Experimental) @Nullable default PeerDependencyOptions getPeerDependencyOptions()
@Stability(value=Experimental) @Nullable default List<String> getPeerDeps()
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: []
@Stability(value=Experimental) @Nullable default String getRepository()
See https://classic.yarnpkg.com/en/docs/package-json/#toc-repository
@Stability(value=Experimental) @Nullable default String getRepositoryDirectory()
@Stability(value=Experimental) @Nullable default Map<String,String> getScripts()
If a script has the same name as a standard script, the standard script will be overwritten.
Default: {}
@Stability(value=Experimental) @Nullable default String getStability()
@Stability(value=Experimental) static NodePackageOptions.Builder builder()
NodePackageOptions.Builder of NodePackageOptionsCopyright © 2021. All rights reserved.