fix typedoc integration
This commit is contained in:
@ -2,10 +2,14 @@ import * as plugins from "./npmts.plugins";
|
||||
import * as paths from "./npmts.paths";
|
||||
import { npmtsOra } from "./npmts.promisechain";
|
||||
|
||||
import {ProjectinfoNpm} from "projectinfo";
|
||||
|
||||
export let projectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.cwd);
|
||||
|
||||
let checkProjectTypings = (configArg) => {
|
||||
let done = plugins.Q.defer();
|
||||
let cwdProjectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.cwd);
|
||||
if(typeof cwdProjectInfo.packageJson.typings == "undefined"){
|
||||
|
||||
if(typeof projectInfo.packageJson.typings == "undefined"){
|
||||
plugins.beautylog.error(`please add typings field to package.json`);
|
||||
process.exit(1);
|
||||
};
|
||||
|
@ -3,6 +3,8 @@ import plugins = require("./npmts.plugins");
|
||||
import paths = require("./npmts.paths");
|
||||
import { npmtsOra } from "./npmts.promisechain";
|
||||
|
||||
import {projectInfo} from "./npmts.check";
|
||||
|
||||
let genTypeDoc = function (configArg) {
|
||||
let done = plugins.Q.defer();
|
||||
npmtsOra.text("now generating " + "TypeDoc documentation".yellow);
|
||||
@ -19,9 +21,9 @@ let genTypeDoc = function (configArg) {
|
||||
json: plugins.path.join(paths.pagesApiDir, "file.json"),
|
||||
|
||||
// TypeDoc options (see typedoc docs)
|
||||
name: "my-project",
|
||||
|
||||
//theme: "default",
|
||||
name: projectInfo.name,
|
||||
readme: plugins.path.join(paths.cwd,"README.md"),
|
||||
// theme: "default",
|
||||
ignoreCompilerErrors: true,
|
||||
version: true,
|
||||
}))
|
||||
|
Reference in New Issue
Block a user