New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.1.10 to 2.1.11

dist/components/comments.component.js

45

dist/plugin.js

@@ -8,3 +8,2 @@ "use strict";

};
var MarkdownPlugin_1;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -14,9 +13,8 @@ const path = require("path");

const components_1 = require("typedoc/dist/lib/converter/components");
const events_1 = require("typedoc/dist/lib/output/events");
const theme_1 = require("./theme/theme");
const theme_bitbucket_1 = require("./theme/theme.bitbucket");
const theme_docusaurus_1 = require("./theme/theme.docusaurus");
const theme_gitbook_1 = require("./theme/theme.gitbook");
const theme_vuepress_1 = require("./theme/theme.vuepress");
let MarkdownPlugin = MarkdownPlugin_1 = class MarkdownPlugin extends components_1.ConverterComponent {
const bitbucket_theme_1 = require("./themes/bitbucket.theme");
const docusaurus_theme_1 = require("./themes/docusaurus.theme");
const gitbook_theme_1 = require("./themes/gitbook.theme");
const markdown_theme_1 = require("./themes/markdown.theme");
const vuepress_theme_1 = require("./themes/vuepress.theme");
let MarkdownPlugin = class MarkdownPlugin extends components_1.ConverterComponent {
initialize() {

@@ -26,18 +24,8 @@ this.listenTo(this.owner, {

});
this.listenTo(this.application.renderer, {
[events_1.RendererEvent.BEGIN]: this.onRenderBegin,
});
}
onBegin() {
MarkdownPlugin_1.settings = this.application.options.getRawValues();
MarkdownPlugin_1.setTheme(this.application.renderer, this.application.options);
}
onRenderBegin(renderer) {
if (MarkdownPlugin_1.theme) {
MarkdownPlugin_1.project = renderer.project;
}
}
static setTheme(renderer, options) {
const renderer = this.application.renderer;
const options = this.application.options;
const themeName = options.getValue('theme');
const themePath = path.join(__dirname, './theme/');
const themePath = path.join(__dirname, './theme');
const platform = options.getValue('platform');

@@ -47,26 +35,25 @@ const theme = themeName === 'markdown' ? this.getTheme(platform, renderer, themePath, options) : null;

renderer.theme = renderer.addComponent('theme', theme);
MarkdownPlugin_1.theme = theme;
}
}
static getTheme(platform, renderer, themePath, options) {
getTheme(platform, renderer, themePath, options) {
if (platform) {
if (platform === 'gitbook') {
return new theme_gitbook_1.GitbookTheme(renderer, themePath, options);
return new gitbook_theme_1.GitbookTheme(renderer, themePath, options);
}
if (platform === 'docusaurus') {
return new theme_docusaurus_1.DocusaurusTheme(renderer, themePath, options);
return new docusaurus_theme_1.DocusaurusTheme(renderer, themePath, options);
}
if (platform === 'bitbucket') {
return new theme_bitbucket_1.BitbucketTheme(renderer, themePath, options);
return new bitbucket_theme_1.BitbucketTheme(renderer, themePath, options);
}
if (platform === 'vuepress') {
return new theme_vuepress_1.VuePressTheme(renderer, themePath, options);
return new vuepress_theme_1.VuePressTheme(renderer, themePath, options);
}
}
return new theme_1.MarkdownTheme(renderer, themePath, options);
return new markdown_theme_1.MarkdownTheme(renderer, themePath, options);
}
};
MarkdownPlugin = MarkdownPlugin_1 = __decorate([
MarkdownPlugin = __decorate([
components_1.Component({ name: 'markdown' })
], MarkdownPlugin);
exports.MarkdownPlugin = MarkdownPlugin;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const plugin_1 = require("../../plugin");
const heading_1 = require("./heading");
function memberTitle() {
const md = [heading_1.heading(3)];
if (plugin_1.MarkdownPlugin.settings.namedAnchors) {
md.push(`<a id="${this.anchor}" name="${this.anchor}"></a>`);
}
const md = [];
if (this.flags) {

@@ -11,0 +6,0 @@ md.push(this.flags.map(flag => `\`${flag}\``).join(' '));

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Handlebars = require("handlebars");
const plugin_1 = require("../../plugin");
const theme_docusaurus_1 = require("../theme.docusaurus");
const strip_line_breaks_1 = require("./strip-line-breaks");

@@ -25,5 +23,3 @@ const type_1 = require("./type");

`\`${parameter.flags.isRest ? '...' : ''}${parameter.name}${isOptional ? '?' : ''}\``,
typeOut
? typeOut.toString().replace(/\|/g, plugin_1.MarkdownPlugin.theme instanceof theme_docusaurus_1.DocusaurusTheme ? '&#124;' : '\\|')
: '',
typeOut ? typeOut.toString().replace(/\|/g, '&#124;') : '',
];

@@ -30,0 +26,0 @@ if (hasDefaultValues) {

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

@@ -11,8 +11,14 @@ "main": "dist/index.js",

"lint": "tslint --project ./tsconfig.json",
"build": "rm -rf dist && tsc && copyfiles --up 2 ./src/**/*.hbs ./dist/",
"prepublishOnly": "npm run test && npm run build",
"pretest": "npm run lint",
"build": "rm -rf dist && tsc && copyfiles --up 1 ./src/**/*.hbs ./dist/",
"prepublishOnly": "npm run test",
"pretest": "npm run lint && npm run build",
"test": "jest",
"examples": "npm run build && node ./tasks/examples.js",
"fixtures": "rm -rf ./src/test/fixtures/ts && node ./tasks/fixtures.js"
"fixtures": "rm -rf ./test/fixtures && node ./tasks/fixtures.js",
"examples": "npm-run-all build examples:*",
"examples:html": "node ./tasks/example.js -t default -o typedoc-html",
"examples:markdown": "node ./tasks/example.js -t markdown -o typedoc-markdown",
"examples:docusaurus": "node ./tasks/example.js -t markdown -p docusaurus -o typedoc-docusaurus/docs/myapi",
"examples:vuepress": "node ./tasks/example.js -t markdown -p vuepress -o typedoc-vuepress/docs",
"examples:gitbook": "node ./tasks/example.js -t markdown -p gitbook -o typedoc-gitbook/docs",
"examples:bitbucket": "node ./tasks/example.js -t markdown -p bitbucket -o typedoc-bitbucket"
},

@@ -44,11 +50,10 @@ "author": "Thomas Grey",

"@types/jest": "^24.0.17",
"@types/node": "^12.7.2",
"@types/node": "^12.7.4",
"arg": "^4.1.1",
"chalk": "^2.4.2",
"copyfiles": "^2.1.1",
"cross-spawn": "^7.0.0",
"jest": "^24.9.0",
"prettier": "^1.18.2",
"npm-run-all": "^4.1.5",
"ts-jest": "^24.0.2",
"tslint": "^5.18.0",
"tslint": "^5.19.0",
"typedoc": "0.15.0",

@@ -55,0 +60,0 @@ "typescript": "3.5.x"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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