projectinfo/dist/index.js

18 lines
2.0 KiB
JavaScript
Raw Normal View History

2016-02-20 04:05:07 +00:00
//import classes
var ProjectinfoNPM = require("./projectinfo.npm");
var projectinfo = {};
2016-02-20 05:06:43 +00:00
//specific classes
2016-02-20 04:05:07 +00:00
projectinfo.npm = function (cwdArg) {
return new ProjectinfoNPM(cwdArg);
};
2016-02-20 05:06:43 +00:00
//quick functions
projectinfo.getName = function (cwdArg) {
var localNpm = projectinfo.npm(cwdArg);
if (localNpm.status === "ok") {
return localNpm.name;
}
};
2016-02-20 04:05:07 +00:00
module.exports = projectinfo;
2016-02-20 05:06:43 +00:00
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLGdCQUFnQjtBQUNoQixJQUFPLGNBQWMsV0FBVyxtQkFBbUIsQ0FBQyxDQUFDO0FBRXJELElBQUksV0FBVyxHQUFPLEVBQUUsQ0FBQztBQUV6QixrQkFBa0I7QUFDbEIsV0FBVyxDQUFDLEdBQUcsR0FBRyxVQUFTLE1BQU07SUFDN0IsTUFBTSxDQUFDLElBQUksY0FBYyxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQ3RDLENBQUMsQ0FBQztBQUVGLGlCQUFpQjtBQUNqQixXQUFXLENBQUMsT0FBTyxHQUFHLFVBQVMsTUFBTTtJQUNqQyxJQUFJLFFBQVEsR0FBRyxXQUFXLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDO0lBQ3ZDLEVBQUUsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxNQUFNLEtBQUssSUFBSSxDQUFDLENBQUEsQ0FBQztRQUMxQixNQUFNLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQztJQUN6QixDQUFDO0FBQ0wsQ0FBQyxDQUFDO0FBWUYsaUJBQVMsV0FBVyxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291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