public class JkNodeJsProject
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
JkNodeJsProject |
build()
Executes the build phase for the Node.js project using the specified build commands.
|
java.nio.file.Path |
getBaseJsDir()
Retrieves the base directory for the Node.js project.
|
java.util.List<java.lang.String> |
getBuildCommands() |
java.nio.file.Path |
getBuildDir()
Retrieves the build directory for the Node.js project.
|
JkNodeJs |
getNodeJs() |
java.util.function.Consumer<java.nio.file.Path> |
getPackAction() |
java.util.List<java.lang.String> |
getTestCommands() |
static JkNodeJsProject |
of(JkNodeJs nodeJs,
java.nio.file.Path baseJsDir,
java.lang.String buildDir) |
static JkNodeJsProject |
of(JkNodeJs nodeJs,
java.nio.file.Path baseJsDir,
java.lang.String buildDir,
java.util.List<java.lang.String> buildCommands) |
JkNodeJsProject |
pack()
Executes the packaging phase for the Node.js project.
|
JkNodeJsProject |
setBaseJsDir(java.nio.file.Path baseJsDir) |
JkNodeJsProject |
setBuildCommands(java.lang.String... buildCommands)
Sets the build commands to be executed during the build phase
of the Node.js project.
|
JkNodeJsProject |
setBuildDir(java.lang.String buildDir) |
JkNodeJsProject |
setCopyToResourcesPackAction(dev.jeka.core.api.project.JkProject project,
java.lang.String relPath)
Sets an action to copy the build directory contents of the Node.js project
to the specified relative path within the given JkProject's class output directory.
|
JkNodeJsProject |
setPackAction(java.util.function.Consumer<java.nio.file.Path> packAction)
Sets the packaging action for the Node.js project.
|
JkNodeJsProject |
setTestCommands(java.lang.String... testCommands)
Sets the test commands to be executed during the test phase
of the Node.js project.
|
JkNodeJsProject |
test()
Executes the test phase for the Node.js project.
|
public static JkNodeJsProject of(JkNodeJs nodeJs, java.nio.file.Path baseJsDir, java.lang.String buildDir, java.util.List<java.lang.String> buildCommands)
public static JkNodeJsProject of(JkNodeJs nodeJs, java.nio.file.Path baseJsDir, java.lang.String buildDir)
public JkNodeJs getNodeJs()
public java.util.List<java.lang.String> getBuildCommands()
public java.util.List<java.lang.String> getTestCommands()
public java.util.function.Consumer<java.nio.file.Path> getPackAction()
public JkNodeJsProject build()
dev.jeka.core.tool.JkException - if no build commands are defined or there is a misconfiguration.public JkNodeJsProject test()
public JkNodeJsProject pack()
public JkNodeJsProject setBuildCommands(java.lang.String... buildCommands)
public JkNodeJsProject setTestCommands(java.lang.String... testCommands)
public JkNodeJsProject setPackAction(java.util.function.Consumer<java.nio.file.Path> packAction)
packAction - a Consumerpublic JkNodeJsProject setCopyToResourcesPackAction(dev.jeka.core.api.project.JkProject project, java.lang.String relPath)
project - the JkProject instance whose class output directory is the target for the copyrelPath - the relative path within the class output directory where the build contents will be copiedpublic java.nio.file.Path getBaseJsDir()
public JkNodeJsProject setBaseJsDir(java.nio.file.Path baseJsDir)
public JkNodeJsProject setBuildDir(java.lang.String buildDir)
public java.nio.file.Path getBuildDir()