public class NodeInfoReader extends Object implements BuildInfoReader
| Modifier and Type | Field and Description |
|---|---|
static String |
NEW_LINE |
CLASSIFIER, DESTINATION_DIR, EXTENSION, JAR| Constructor and Description |
|---|
NodeInfoReader() |
| Modifier and Type | Method and Description |
|---|---|
BuildInfo |
getInfo(Path root) |
static String |
getVersion(Path modulePath) |
protected static String |
getVersionFromOutput(String output) |
boolean |
isApplicable(Path root) |
int |
order() |
protected static Map<String,String> |
readPackageJson(Path path)
Parse package.json and read the nodejs configuration as a
Map. |
public static final String NEW_LINE
public int order()
order in interface BuildInfoReaderpublic boolean isApplicable(Path root)
isApplicable in interface BuildInfoReaderpublic BuildInfo getInfo(Path root)
getInfo in interface BuildInfoReaderprotected static Map<String,String> readPackageJson(Path path)
Map.
In detail, it parses:
- name
- version
- mainpath - The path to package.json.Copyright © 2018–2022 Red Hat. All rights reserved.