projectinfo/ts/projectinfo.npm.ts

24 lines
644 B
TypeScript
Raw Normal View History

2016-02-20 04:05:07 +00:00
/// <reference path="./typings/main.d.ts" />
import plugins = require("./projectinfo.plugins");
class ProjectinfoNPM {
packageJson;
name:string;
version:string;
2016-02-20 05:06:43 +00:00
status:string;
2016-02-21 16:17:31 +00:00
license:string;
2016-02-20 04:05:07 +00:00
2016-02-20 05:06:43 +00:00
constructor(cwdArg:string){
2016-02-20 04:05:07 +00:00
this.packageJson = plugins.smartfile.readFileToObject(
plugins.path.join(
plugins.path.resolve(cwdArg),
"package.json"
)
);
this.name = this.packageJson.name;
this.version = this.packageJson.version;
2016-02-21 16:17:31 +00:00
this.license = this.packageJson.license;
2016-02-20 05:06:43 +00:00
this.status = "ok";
2016-02-20 04:05:07 +00:00
}
}
export = ProjectinfoNPM;