Package io.github.maritims
Class NpmWrapper
- java.lang.Object
-
- io.github.maritims.node.NodeWrapper
-
- io.github.maritims.NpmWrapper
-
public class NpmWrapper extends NodeWrapper
Responsible for running npm commands.
-
-
Field Summary
-
Fields inherited from class io.github.maritims.node.NodeWrapper
projectSourceCodeDirectory
-
-
Constructor Summary
Constructors Constructor Description NpmWrapper(NodeConfiguration nodeConfiguration, String projectSourceCodeDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intdoSystemCall(ProcessBuilder pb)booleaninstall()Run the npm install command.booleanrun(String script)Executes the specified script.booleanrunScript(String script)-
Methods inherited from class io.github.maritims.node.NodeWrapper
download, extract, getDownloadFilePath, getNodeExe, getNodePaths, getPackageJson, getVersionString
-
-
-
-
Constructor Detail
-
NpmWrapper
public NpmWrapper(NodeConfiguration nodeConfiguration, String projectSourceCodeDirectory)
-
-
Method Detail
-
doSystemCall
protected int doSystemCall(ProcessBuilder pb)
-
install
public boolean install()
Run the npm install command.- Returns:
- A boolean indicating whether the install command was executed successfully.
-
runScript
public boolean runScript(String script)
-
run
public boolean run(String script)
Description copied from class:NodeWrapperExecutes the specified script.- Specified by:
runin classNodeWrapper- Parameters:
script- The script to execute.- Returns:
- A boolean indicating whether the script was executed successfully.
-
-