feat(projectinfo): migrate project info loading to async factories and update build configuration
This commit is contained in:
@@ -13,8 +13,8 @@ import { ProjectinfoNpm } from './projectinfo.classes.npm.js';
|
||||
/**
|
||||
* gets the name from package.json in a specified directory
|
||||
*/
|
||||
export let getNpmNameForDir = function (cwdArg) {
|
||||
let localNpm = new ProjectinfoNpm(cwdArg);
|
||||
export let getNpmNameForDir = async function (cwdArg: string) {
|
||||
let localNpm = await ProjectinfoNpm.create(cwdArg);
|
||||
if (localNpm.status === 'ok') {
|
||||
return localNpm.name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user