projectinfo/dist/index.js

28 lines
2.2 KiB
JavaScript
Raw Normal View History

2016-06-09 01:13:40 +00:00
"use strict";
require("typings-global");
//npm
var projectinfo_classes_npm_1 = require("./projectinfo.classes.npm");
var projectinfo_classes_npm_2 = require("./projectinfo.classes.npm");
exports.ProjectinfoNpm = projectinfo_classes_npm_2.ProjectinfoNpm;
exports.npm = function (cwdArg, optionsArg) {
return new projectinfo_classes_npm_1.ProjectinfoNpm(cwdArg, optionsArg);
2016-02-20 04:05:07 +00:00
};
2016-02-20 05:06:43 +00:00
//quick functions
2016-06-09 01:13:40 +00:00
exports.getName = function (cwdArg) {
var localNpm = new projectinfo_classes_npm_1.ProjectinfoNpm(cwdArg);
2016-02-20 05:06:43 +00:00
if (localNpm.status === "ok") {
return localNpm.name;
}
};
2016-06-09 01:13:40 +00:00
/* TODO
projectinfo.git = function(){
2016-02-20 04:05:07 +00:00
2016-06-09 01:13:40 +00:00
};
projectinfo.mojo = function(){
};
*/
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUNQLENBQUMsQ0FEc0I7QUFHdkIsS0FBSztBQUNMLHdDQUE2QiwyQkFBMkIsQ0FBQyxDQUFBO0FBQ3pELHdDQUE2QiwyQkFBMkIsQ0FBQztBQUFqRCxrRUFBaUQ7QUFDOUMsV0FBRyxHQUFHLFVBQVMsTUFBTSxFQUFDLFVBQVU7SUFDdkMsTUFBTSxDQUFDLElBQUksd0NBQWMsQ0FBQyxNQUFNLEVBQUMsVUFBVSxDQUFDLENBQUM7QUFDakQsQ0FBQyxDQUFDO0FBRUYsaUJBQWlCO0FBQ04sZUFBTyxHQUFHLFVBQVMsTUFBTTtJQUNoQyxJQUFJLFFBQVEsR0FBRyxJQUFJLHdDQUFjLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDMUMsRUFBRSxDQUF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