tscoverage/ts/npmts.jsdoc.ts

30 lines
882 B
TypeScript
Raw Normal View History

2016-05-25 03:23:48 +00:00
import "typings-global";
2016-02-22 21:22:39 +00:00
import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths");
2016-05-17 00:32:40 +00:00
import {npmtsOra} from "./npmts.promisechain";
2016-02-22 21:22:39 +00:00
2016-03-26 13:08:48 +00:00
let genJsdoc = function(configArg){
let done = plugins.Q.defer();
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-03-26 13:08:48 +00:00
export let run = function(configArg){
let 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;
};