now using EsDoc, closes #2

This commit is contained in:
LosslessBot 2016-07-14 13:02:58 +02:00
parent f0cc2f4cd6
commit 430f636ae4
6 changed files with 41 additions and 41 deletions

26
dist/npmts.jsdoc.js vendored
View File

@ -3,26 +3,24 @@ require("typings-global");
var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths");
var npmts_promisechain_1 = require("./npmts.promisechain");
var genJsdoc = function (configArg) {
var genEsDoc = function (configArg) {
var done = plugins.Q.defer();
npmts_promisechain_1.npmtsOra.text("now generating " + "JsDoc documentation".yellow);
plugins.gulp.src([
plugins.path.join(paths.cwd, "README.md"),
plugins.path.join(paths.distDir, "**/*.js")
])
.pipe(plugins.g.jsdoc3({
opts: {
npmts_promisechain_1.npmtsOra.text("now generating " + "EsDoc documentation".yellow);
plugins.beautylog.log("ESDoc Output:");
var esdocConfig = {
source: paths.distDir,
destination: paths.docsDir
}
}, function () {
plugins.beautylog.ok("JsDoc documentation has been generated!");
};
plugins.esdoc.generate(esdocConfig, plugins.esdocPublisher);
plugins.beautylog.ok("Docs by EsDoc have been created!");
done.resolve(configArg);
}));
return done.promise;
};
exports.run = function (configArg) {
var done = plugins.Q.defer();
genJsdoc(configArg)
.then(done.resolve);
genEsDoc(configArg)
.then(function () {
done.resolve(configArg);
});
return done.promise;
};

View File

@ -1,10 +1,11 @@
import "typings-global";
export import beautylog = require("beautylog");
export declare let esdoc: any;
export declare let esdocPublisher: any;
export declare let gulp: any;
export declare let g: {
gFunction: any;
istanbul: any;
jsdoc3: any;
mocha: any;
replace: any;
sourcemaps: any;

View File

@ -1,11 +1,12 @@
"use strict";
require("typings-global");
exports.beautylog = require("beautylog");
exports.esdoc = require("esdoc");
exports.esdocPublisher = require("esdoc/out/src/Publisher/publish");
exports.gulp = require("gulp");
exports.g = {
gFunction: require("gulp-function"),
istanbul: require("gulp-istanbul"),
jsdoc3: require("gulp-jsdoc3"),
mocha: require("gulp-mocha"),
replace: require("gulp-replace"),
sourcemaps: require("gulp-sourcemaps")

View File

@ -29,11 +29,12 @@
},
"homepage": "https://gitlab.com/pushrocks/npmts#readme",
"dependencies": {
"@types/minimatch": "^2.0.22-alpha",
"@types/q": "0.0.21-alpha",
"@types/shelljs": "^0.3.21-alpha",
"beautylog": "5.0.12",
"@types/minimatch": "^2.0.27-alpha",
"@types/q": "0.0.26-alpha",
"@types/shelljs": "^0.3.26-alpha",
"beautylog": "5.0.13",
"early": "^2.0.13",
"esdoc": "^0.4.7",
"gulp": "3.9.1",
"gulp-concat": "^2.6.0",
"gulp-function": "^1.3.6",
@ -54,9 +55,9 @@
"smartenv": "1.2.5",
"smartfile": "4.0.10",
"smartpath": "3.2.2",
"smartstring": "^2.0.10",
"smartstring": "^2.0.14",
"source-map-support": "^0.4.1",
"tsn": "^1.0.5",
"tsn": "^1.0.6",
"typescript": "^2.0.0-dev.20160630",
"typings-global": "*"
},

View File

@ -3,28 +3,26 @@ import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths");
import {npmtsOra} from "./npmts.promisechain";
let genJsdoc = function(configArg){
let genEsDoc = function(configArg){
let done = plugins.Q.defer();
npmtsOra.text("now generating " + "JsDoc documentation".yellow);
plugins.gulp.src([
plugins.path.join(paths.cwd,"README.md"),
plugins.path.join(paths.distDir,"**/*.js")
])
.pipe(plugins.g.jsdoc3({
opts: {
npmtsOra.text("now generating " + "EsDoc documentation".yellow);
plugins.beautylog.log("ESDoc Output:");
let esdocConfig = {
source: paths.distDir,
destination: paths.docsDir
}
}, function(){
plugins.beautylog.ok("JsDoc documentation has been generated!");
done.resolve(configArg)
}));
};
plugins.esdoc.generate(esdocConfig,plugins.esdocPublisher);
plugins.beautylog.ok("Docs by EsDoc have been created!");
done.resolve(configArg);
return done.promise;
};
export let run = function(configArg){
let done = plugins.Q.defer();
genJsdoc(configArg)
.then(done.resolve);
genEsDoc(configArg)
.then(() => {
done.resolve(configArg);
});
return done.promise;
};

View File

@ -1,10 +1,11 @@
import "typings-global";
export import beautylog = require("beautylog");
export let esdoc = require("esdoc");
export let esdocPublisher = require("esdoc/out/src/Publisher/publish");
export let gulp = require("gulp");
export let g = {
gFunction: require("gulp-function"),
istanbul: require("gulp-istanbul"),
jsdoc3: require("gulp-jsdoc3"),
mocha: require("gulp-mocha"),
replace: require("gulp-replace"),
sourcemaps: require("gulp-sourcemaps")