tscoverage/dist/npmts.jsdoc.js

29 lines
890 B
JavaScript
Raw Normal View History

2016-03-12 09:21:16 +00:00
"use strict";
2016-05-25 03:23:48 +00:00
require("typings-global");
2016-02-22 21:22:39 +00:00
var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths");
2016-05-17 00:32:40 +00:00
var npmts_promisechain_1 = require("./npmts.promisechain");
2016-02-23 17:35:28 +00:00
var genJsdoc = function (configArg) {
2016-02-22 21:22:39 +00:00
var done = plugins.Q.defer();
npmts_promisechain_1.npmtsOra.text("now generating " + "JsDoc documentation".yellow);
2016-02-22 21:22:39 +00:00
plugins.gulp.src([
plugins.path.join(paths.cwd, "README.md"),
plugins.path.join(paths.distDir, "**/*.js")
])
.pipe(plugins.g.jsdoc3({
opts: {
destination: paths.docsDir
}
2016-02-23 17:35:28 +00:00
}, function () {
2016-03-14 03:53:35 +00:00
plugins.beautylog.ok("JsDoc documentation has been generated!");
2016-02-23 17:35:28 +00:00
done.resolve(configArg);
}));
2016-02-22 21:22:39 +00:00
return done.promise;
};
2016-02-23 17:35:28 +00:00
exports.run = function (configArg) {
2016-02-22 21:22:39 +00:00
var done = plugins.Q.defer();
2016-02-23 17:35:28 +00:00
genJsdoc(configArg)
2016-02-22 21:22:39 +00:00
.then(done.resolve);
return done.promise;
};