Load all types not no types from Npm Package when no types are specified
This commit is contained in:
parent
83f608597a
commit
957e9fe7cc
|
@ -550,10 +550,19 @@ public class NpmPackage {
|
||||||
public List<String> listResources(String... types) throws IOException {
|
public List<String> listResources(String... types) throws IOException {
|
||||||
List<String> res = new ArrayList<String>();
|
List<String> res = new ArrayList<String>();
|
||||||
NpmPackageFolder folder = folders.get("package");
|
NpmPackageFolder folder = folders.get("package");
|
||||||
for (String s : types) {
|
if (types.length == 0) {
|
||||||
if (folder.types.containsKey(s))
|
for (String s : folder.types.keySet()) {
|
||||||
|
if (folder.types.containsKey(s)) {
|
||||||
res.addAll(folder.types.get(s));
|
res.addAll(folder.types.get(s));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (String s : types) {
|
||||||
|
if (folder.types.containsKey(s)) {
|
||||||
|
res.addAll(folder.types.get(s));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Collections.sort(res);
|
Collections.sort(res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue