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

30
dist/npmts.jsdoc.js vendored
View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,11 @@
import "typings-global"; import "typings-global";
export import beautylog = require("beautylog"); 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 gulp = require("gulp");
export let g = { export let g = {
gFunction: require("gulp-function"), gFunction: require("gulp-function"),
istanbul: require("gulp-istanbul"), istanbul: require("gulp-istanbul"),
jsdoc3: require("gulp-jsdoc3"),
mocha: require("gulp-mocha"), mocha: require("gulp-mocha"),
replace: require("gulp-replace"), replace: require("gulp-replace"),
sourcemaps: require("gulp-sourcemaps") sourcemaps: require("gulp-sourcemaps")