Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typedoc-plugin-markdown

Package Overview
Dependencies
Maintainers
1
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typedoc-plugin-markdown - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

dist/theme/helpers/breadcrumbs.js

@@ -11,3 +11,3 @@ "use strict";

}
const md = [`[Globals](${relative_url_1.relativeUrl(this.project.url)}) /`];
const md = plugin_1.MarkdownPlugin.theme.hasGlobalsFile ? [`[Globals](${relative_url_1.relativeUrl(this.project.url)}) /`] : [];
return breadcrumb(this.model, md);

@@ -14,0 +14,0 @@ }

@@ -9,3 +9,3 @@ "use strict";

function mainTitle() {
if (!isVisible()) {
if (!isVisible(this)) {
return '';

@@ -16,5 +16,5 @@ }

exports.mainTitle = mainTitle;
function isVisible() {
if (plugin_1.MarkdownPlugin.theme instanceof theme_docusaurus_1.DocusaurusTheme) {
return true;
function isVisible(page) {
if (page.url === plugin_1.MarkdownPlugin.theme.indexName) {
return false;
}

@@ -21,0 +21,0 @@ return true;

@@ -7,2 +7,5 @@ "use strict";

md.push('■');
if (this.flags && !this.flags.isRest) {
md.push(this.flags.map(flag => `\`${flag}\` `));
}
md.push(`\`${this.flags.isRest ? '...' : ''} ${this.name}\``);

@@ -12,4 +15,7 @@ if (this.type) {

}
if (this.defaultValue) {
md.push(`= ${this.defaultValue}`);
}
return md.join('');
}
exports.parameterNameAndType = parameterNameAndType;

@@ -13,3 +13,3 @@ "use strict";

if (hasDefaultValues) {
headers.push('Default value');
headers.push('Default');
}

@@ -21,3 +21,7 @@ if (hasComments) {

const isOptional = parameter.flags.includes('Optional');
const row = [`\`${parameter.flags.isRest ? '...' : ''}${parameter.name}${isOptional ? '?' : ''}\``, type_1.type.call(parameter.type)];
const typeOut = type_1.type.call(parameter.type);
const row = [
`\`${parameter.flags.isRest ? '...' : ''}${parameter.name}${isOptional ? '?' : ''}\``,
typeOut.toString().replace(/\|/g, '\\|'),
];
if (hasDefaultValues) {

@@ -24,0 +28,0 @@ row.push(parameter.defaultValue ? parameter.defaultValue : '-');

@@ -56,3 +56,3 @@ "use strict";

function getStringLiteralType(model) {
return model.value;
return `"${model.value}"`;
}

@@ -5,3 +5,3 @@ "use strict";

const typedoc_1 = require("typedoc");
const index_1 = require("typedoc/dist/lib/models/reflections/index");
const reflections_1 = require("typedoc/dist/lib/models/reflections");
const UrlMapping_1 = require("typedoc/dist/lib/output/models/UrlMapping");

@@ -14,2 +14,3 @@ const theme_1 = require("typedoc/dist/lib/output/theme");

this.navigationTitlesMap = {};
this.hasGlobalsFile = false;
renderer.removeComponent('navigation');

@@ -40,14 +41,15 @@ renderer.removeComponent('assets');

const entryPoint = this.getEntryPoint(project);
if (this.application.options.getValue('readme') === 'none') {
entryPoint.url = this.indexName;
urls.push(new UrlMapping_1.UrlMapping(this.indexName, entryPoint, 'reflection.hbs'));
}
else {
if (project.readme && this.application.options.getValue('readme') !== 'none') {
entryPoint.url = this.globalsName;
urls.push(new UrlMapping_1.UrlMapping(this.globalsName, entryPoint, 'reflection.hbs'));
urls.push(new UrlMapping_1.UrlMapping(this.indexName, entryPoint, 'index.hbs'));
this.hasGlobalsFile = true;
}
else {
entryPoint.url = this.indexName;
urls.push(new UrlMapping_1.UrlMapping(this.indexName, entryPoint, 'reflection.hbs'));
}
if (entryPoint.children) {
entryPoint.children.forEach((child) => {
if (child instanceof index_1.DeclarationReflection) {
if (child instanceof reflections_1.DeclarationReflection) {
this.buildUrls(child, urls);

@@ -76,15 +78,15 @@ }

function getNavigationGroup(reflection) {
if (reflection.kind === index_1.ReflectionKind.ExternalModule) {
if (reflection.kind === reflections_1.ReflectionKind.ExternalModule) {
return externalModulesNavigation;
}
if (reflection.kind === index_1.ReflectionKind.Module) {
if (reflection.kind === reflections_1.ReflectionKind.Module) {
return modulesNavigation;
}
if (reflection.kind === index_1.ReflectionKind.Class) {
if (reflection.kind === reflections_1.ReflectionKind.Class) {
return classesNavigation;
}
if (reflection.kind === index_1.ReflectionKind.Enum) {
if (reflection.kind === reflections_1.ReflectionKind.Enum) {
return enumsNavigation;
}
if (reflection.kind === index_1.ReflectionKind.Interface) {
if (reflection.kind === reflections_1.ReflectionKind.Interface) {
return interfacesNavigation;

@@ -172,3 +174,3 @@ }

if (reflection) {
if (reflection instanceof index_1.ContainerReflection) {
if (reflection instanceof reflections_1.ContainerReflection) {
return reflection;

@@ -215,3 +217,3 @@ }

reflection.traverse(child => {
if (child instanceof index_1.DeclarationReflection) {
if (child instanceof reflections_1.DeclarationReflection) {
this.applyAnchorUrl(child, container);

@@ -218,0 +220,0 @@ }

{
"name": "typedoc-plugin-markdown",
"version": "2.0.3",
"version": "2.0.4",
"description": "A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,3 +0,1 @@

<img align="right" alt="" width="105" src="https://raw.githubusercontent.com/dcurtis/markdown-mark/master/png/208x128.png">
# typedoc-plugin-markdown

@@ -4,0 +2,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc