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-07-14 11:02:58 +00:00
|
|
|
let genEsDoc = function(configArg){
|
2016-03-26 13:08:48 +00:00
|
|
|
let done = plugins.Q.defer();
|
2016-07-14 11:02:58 +00:00
|
|
|
npmtsOra.text("now generating " + "EsDoc documentation".yellow);
|
|
|
|
plugins.beautylog.log("ESDoc Output:");
|
|
|
|
let esdocConfig = {
|
|
|
|
source: paths.distDir,
|
|
|
|
destination: paths.docsDir
|
|
|
|
};
|
|
|
|
plugins.esdoc.generate(esdocConfig,plugins.esdocPublisher);
|
|
|
|
plugins.beautylog.ok("Docs by EsDoc have been created!");
|
|
|
|
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-07-14 11:02:58 +00:00
|
|
|
genEsDoc(configArg)
|
|
|
|
.then(() => {
|
|
|
|
done.resolve(configArg);
|
|
|
|
});
|
2016-02-22 21:22:39 +00:00
|
|
|
return done.promise;
|
|
|
|
};
|