2016-02-20 04:05:07 +00:00
|
|
|
/// <reference path="./typings/main.d.ts" />
|
|
|
|
var plugins = require("./projectinfo.plugins");
|
|
|
|
var ProjectinfoNPM = (function () {
|
2016-02-23 08:36:40 +00:00
|
|
|
function ProjectinfoNPM(cwdArg, optionsArg) {
|
|
|
|
if (optionsArg === void 0) { optionsArg = {}; }
|
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-20 05:06:43 +00:00
|
|
|
this.status = "ok";
|
2016-02-22 23:58:33 +00:00
|
|
|
this.license = this.packageJson.license;
|
|
|
|
if (this.packageJson.repository) {
|
2016-02-23 08:36:40 +00:00
|
|
|
this.git = plugins.smartstring.git(this.packageJson.repository.url, optionsArg.gitAccessToken);
|
2016-02-22 23:58:33 +00:00
|
|
|
}
|
|
|
|
;
|
2016-02-20 04:05:07 +00:00
|
|
|
}
|
|
|
|
return ProjectinfoNPM;
|
|
|
|
})();
|
|
|
|
module.exports = ProjectinfoNPM;
|
|
|
|
|
2016-02-23 08:36:40 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByb2plY3RpbmZvLm5wbS50cyJdLCJuYW1lcyI6WyJQcm9qZWN0aW5mb05QTSIsIlByb2plY3RpbmZvTlBNLmNvbnN0cnVjdG9yIl0sIm1hcHBpbmdzIjoiQUFBQSw0Q0FBNEM7QUFDNUMsSUFBTyxPQUFPLFdBQVcsdUJBQXVCLENBQUMsQ0FBQztBQUNsRDtJQVFJQSx3QkFBWUEsTUFBYUEsRUFBQ0EsVUFBd0NBO1FBQXhDQywwQkFBd0NBLEdBQXhDQSxlQUF3Q0E7UUFDOURBLElBQUlBLENBQUNBLFdBQVdBLEdBQUdBLE9BQU9BLENBQUNBLFNBQVNBLENBQUNBLGdCQUFn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