(name)
| 63 | |
| 64 | // Load package by name (sync version). |
| 65 | const loadPackageSync = function (name) { |
| 66 | try { |
| 67 | let absPath = path.resolve(packagesDir, name + ".yml"); |
| 68 | return preparePackage(yaml.safeLoad(fs.readFileSync(absPath, "utf8"))); |
| 69 | } catch (e) { |
| 70 | console.error(e); |
| 71 | return null; |
| 72 | } |
| 73 | }; |
| 74 | |
| 75 | // Load package names. |
| 76 | const loadPackageNames = async function (options) { |
no test coverage detected