Package io.github.maritims.node
Class NodeWrapper
- java.lang.Object
-
- io.github.maritims.node.NodeWrapper
-
- Direct Known Subclasses:
NpmWrapper
public abstract class NodeWrapper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected StringprojectSourceCodeDirectory
-
Constructor Summary
Constructors Constructor Description NodeWrapper(NodeConfiguration nodeConfiguration, String projectSourceCodeDirectory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleandownload()booleanextract(boolean verbose)PathgetDownloadFilePath()protected PathgetNodeExe()protected NodePathsgetNodePaths()PackageJsongetPackageJson()protected StringgetVersionString()abstract booleanrun(String script)Executes the specified script.
-
-
-
Field Detail
-
projectSourceCodeDirectory
protected final String projectSourceCodeDirectory
-
-
Constructor Detail
-
NodeWrapper
public NodeWrapper(NodeConfiguration nodeConfiguration, String projectSourceCodeDirectory)
-
-
Method Detail
-
getVersionString
protected String getVersionString()
-
getDownloadFilePath
public Path getDownloadFilePath()
-
getNodeExe
protected Path getNodeExe()
-
getNodePaths
protected NodePaths getNodePaths()
-
getPackageJson
public PackageJson getPackageJson()
-
download
public boolean download()
-
extract
public boolean extract(boolean verbose)
-
run
public abstract boolean run(String script)
Executes the specified script.- Parameters:
script- The script to execute.- Returns:
- A boolean indicating whether the script was executed successfully.
-
-