now adding token correctly

This commit is contained in:
2016-02-23 09:36:40 +01:00
parent ed0c947a2e
commit e43322defd
7 changed files with 17 additions and 16 deletions

View File

@ -4,8 +4,8 @@ var projectinfo:any = {};
//classes
import ProjectinfoNPM = require("./projectinfo.npm");
projectinfo.npm = function(cwdArg){
return new ProjectinfoNPM(cwdArg);
projectinfo.npm = function(cwdArg,optionsArg){
return new ProjectinfoNPM(cwdArg,optionsArg);
};
//quick functions

View File

@ -8,7 +8,7 @@ class ProjectinfoNPM {
license:string;
git;
constructor(cwdArg:string){
constructor(cwdArg:string,optionsArg:{gitAccessToken?:string} = {}){
this.packageJson = plugins.smartfile.readFileToObject(
plugins.path.join(
plugins.path.resolve(cwdArg),
@ -20,7 +20,7 @@ class ProjectinfoNPM {
this.status = "ok";
this.license = this.packageJson.license;
if (this.packageJson.repository){
this.git = plugins.smartstring.git(this.packageJson.repository.url);
this.git = plugins.smartstring.git(this.packageJson.repository.url,optionsArg.gitAccessToken);
};
}