@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-20T00:39:28.854Z") @Stability(value=Experimental) public class NodeProject extends GitHubProject
| Modifier and Type | Class and Description |
|---|---|
static class |
NodeProject.Builder
(experimental) A fluent builder for
NodeProject. |
DEFAULT_TASK| Modifier | Constructor and Description |
|---|---|
protected |
NodeProject(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
NodeProject(software.amazon.jsii.JsiiObjectRef objRef) |
|
NodeProject(NodeProjectOptions options) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBins(Map<String,String> bins) |
void |
addBundledDeps(String... deps)
(experimental) Defines bundled dependencies.
|
void |
addCompileCommand(String... commands)
Deprecated.
use `project.compileTask.exec()`
|
void |
addDeps(String... deps)
(experimental) Defines normal dependencies.
|
void |
addDevDeps(String... deps)
(experimental) Defines development/test dependencies.
|
void |
addFields(Map<String,Object> fields)
(experimental) Directly set fields in `package.json`.
|
void |
addKeywords(String... keywords)
(experimental) Adds keywords to package.json (deduplicated).
|
void |
addPackageIgnore(String pattern)
(experimental) Exclude these files from the bundled package.
|
void |
addPeerDeps(String... deps)
(experimental) Defines peer dependencies.
|
void |
addTestCommand(String... commands)
Deprecated.
use `project.testTask.exec()`
|
Boolean |
getAllowLibraryDependencies()
Deprecated.
use `package.allowLibraryDependencies`
|
Boolean |
getAntitamper()
(experimental) Indicates if workflows have anti-tamper checks.
|
AutoMerge |
getAutoMerge()
(experimental) Automatic PR merges.
|
TaskWorkflow |
getBuildWorkflow()
(experimental) The PR build GitHub workflow.
|
String |
getBuildWorkflowJobId() |
Bundler |
getBundler() |
String |
getEntrypoint()
Deprecated.
use `package.entrypoint`
|
List<JobStep> |
getInstallWorkflowSteps() |
Jest |
getJest()
(experimental) The Jest configuration (if enabled).
|
Object |
getManifest()
Deprecated.
use `package.addField(x, y)`
|
String |
getMaxNodeVersion()
(experimental) Maximum node version required by this pacakge.
|
String |
getMinNodeVersion()
(experimental) Minimum node.js version required by this package.
|
IgnoreFile |
getNpmignore()
(experimental) The .npmignore file.
|
NodePackageManager |
getPackageManager()
Deprecated.
use `package.packageManager`
|
NodePackage |
getPackageValue()
(experimental) API for managing the node package.
|
Publisher |
getPublisher()
Deprecated.
use `release.publisher`.
|
Release |
getRelease()
(experimental) Release management.
|
String |
getRunScriptCommand()
(experimental) The command to use to run scripts (e.g.
|
Boolean |
hasScript(String name)
(experimental) Indicates if a script by the name name is defined.
|
void |
removeScript(String name)
(experimental) Removes the npm script (always successful).
|
String |
runTaskCommand(Task task)
(experimental) Returns the shell command to execute in order to run a task.
|
void |
setScript(String name,
String command)
(experimental) Replaces the contents of an npm package.json script.
|
annotateGenerated, getAutoApprove, getDevContainer, getGithub, getGitpod, getProjectType, getVscodeaddExcludeFromCleanup, addGitIgnore, addTask, addTask, addTip, getBuildTask, getCompileTask, getComponents, getDefaultTask, getDeps, getFiles, getGitattributes, getGitignore, getInitProject, getLogger, getName, getOutdir, getPackageTask, getParent, getPostCompileTask, getPreCompileTask, getProjectBuild, getProjenCommand, getRoot, getTasks, getTestTask, postSynthesize, preSynthesize, removeTask, synth, tryFindFile, tryFindJsonFile, tryFindObjectFilejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected NodeProject(software.amazon.jsii.JsiiObjectRef objRef)
protected NodeProject(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public NodeProject(@NotNull
NodeProjectOptions options)
options - This parameter is required.@Stability(value=Experimental)
public void addBins(@NotNull
Map<String,String> bins)
bins - This parameter is required.@Stability(value=Experimental)
public void addBundledDeps(@NotNull
String... deps)
Bundled dependencies will be added as normal dependencies as well as to the
bundledDependencies section of your package.json.
deps - Names modules to install. This parameter is required.@Stability(value=Deprecated) @Deprecated public void addCompileCommand(@NotNull String... commands)
commands - This parameter is required.@Stability(value=Experimental)
public void addDeps(@NotNull
String... deps)
deps - Names modules to install. This parameter is required.@Stability(value=Experimental)
public void addDevDeps(@NotNull
String... deps)
deps - Names modules to install. This parameter is required.@Stability(value=Experimental)
public void addFields(@NotNull
Map<String,Object> fields)
fields - The fields to set. This parameter is required.@Stability(value=Experimental)
public void addKeywords(@NotNull
String... keywords)
keywords - The keywords to add. This parameter is required.@Stability(value=Experimental)
public void addPackageIgnore(@NotNull
String pattern)
Implemented by project types based on the
packaging mechanism. For example, NodeProject delegates this to .npmignore.
addPackageIgnore in class Projectpattern - This parameter is required.@Stability(value=Experimental)
public void addPeerDeps(@NotNull
String... deps)
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 - Names modules to install. This parameter is required.@Stability(value=Deprecated) @Deprecated public void addTestCommand(@NotNull String... commands)
commands - This parameter is required.@Stability(value=Experimental) @NotNull public Boolean hasScript(@NotNull String name)
name - The name of the script. This parameter is required.@Stability(value=Experimental)
public void removeScript(@NotNull
String name)
name - The name of the script. This parameter is required.@Stability(value=Experimental) @NotNull public String runTaskCommand(@NotNull Task task)
This will
typically be npx projen TASK.
runTaskCommand in class Projecttask - The task for which the command is required. This parameter is required.@Stability(value=Experimental)
public void setScript(@NotNull
String name,
@NotNull
String command)
name - The script name. This parameter is required.command - The command to execute. This parameter is required.@Stability(value=Deprecated) @Deprecated @NotNull public Boolean getAllowLibraryDependencies()
@Stability(value=Experimental) @NotNull public Boolean getAntitamper()
@Stability(value=Experimental) @NotNull public Bundler getBundler()
@Stability(value=Deprecated) @Deprecated @NotNull public String getEntrypoint()
@Stability(value=Experimental) @NotNull public List<JobStep> getInstallWorkflowSteps()
@Stability(value=Deprecated) @Deprecated @NotNull public Object getManifest()
@Stability(value=Experimental) @NotNull public NodePackage getPackageValue()
@Stability(value=Deprecated) @Deprecated @NotNull public NodePackageManager getPackageManager()
@Stability(value=Experimental) @NotNull public String getRunScriptCommand()
@Stability(value=Experimental) @Nullable public AutoMerge getAutoMerge()
@Stability(value=Experimental) @Nullable public TaskWorkflow getBuildWorkflow()
undefined if buildWorkflow is disabled.
@Stability(value=Experimental) @Nullable public String getBuildWorkflowJobId()
@Stability(value=Experimental) @Nullable public Jest getJest()
@Stability(value=Experimental) @Nullable public String getMaxNodeVersion()
@Stability(value=Experimental) @Nullable public String getMinNodeVersion()
@Stability(value=Experimental) @Nullable public IgnoreFile getNpmignore()
@Stability(value=Deprecated) @Deprecated @Nullable public Publisher getPublisher()
This will be undefined if the project does not have a
release workflow.
@Stability(value=Experimental) @Nullable public Release getRelease()
Copyright © 2021. All rights reserved.