update dependencies and restructure code

This commit is contained in:
2016-06-09 01:38:22 +02:00
parent bb926b7319
commit a7035a56fc
7 changed files with 50 additions and 34 deletions

View File

@@ -0,0 +1,27 @@
/// <reference path="./typings/main.d.ts" />
import plugins = require("./projectinfo.plugins");
export class ProjectinfoNpm {
packageJson;
name:string;
version:string;
status:string;
license:string;
git;
constructor(cwdArg:string,optionsArg:{gitAccessToken?:string} = {}){
this.packageJson = plugins.smartfile.readFileToObject(
plugins.path.join(
plugins.path.resolve(cwdArg),
"package.json"
)
);
this.name = this.packageJson.name;
this.version = this.packageJson.version;
this.status = "ok";
this.license = this.packageJson.license;
if (this.packageJson.repository){
this.git = plugins.smartstring.git(this.packageJson.repository.url,optionsArg.gitAccessToken);
};
};
}