now adding token correctly
This commit is contained in:
@ -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
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user