add repo information

This commit is contained in:
2016-02-23 00:58:33 +01:00
parent d394588fff
commit e4ef9bf97a
2 changed files with 18 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ class ProjectinfoNPM {
version:string;
status:string;
license:string;
repoUrl:string;
constructor(cwdArg:string){
this.packageJson = plugins.smartfile.readFileToObject(
@@ -16,8 +17,15 @@ class ProjectinfoNPM {
);
this.name = this.packageJson.name;
this.version = this.packageJson.version;
this.license = this.packageJson.license;
this.status = "ok";
this.license = this.packageJson.license;
if (this.packageJson.repository){
this.repoUrl = this.packageJson.repository.url;
} else {
this.repoUrl = undefined;
};
}
}