@compodoc/compodoc
Advanced tools
Comparing version 1.1.18 to 1.1.19
@@ -5,3 +5,3 @@ 'use strict'; | ||
var indexCli = require('./index-cli-a4b7f403.js'); | ||
var indexCli = require('./index-cli-f7393cac.js'); | ||
require('fs-extra'); | ||
@@ -8,0 +8,0 @@ require('path'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var indexCli = require('./index-cli-a4b7f403.js'); | ||
var indexCli = require('./index-cli-f7393cac.js'); | ||
require('fs-extra'); | ||
@@ -8,0 +8,0 @@ require('path'); |
{ | ||
"name": "@compodoc/compodoc", | ||
"version": "1.1.18", | ||
"version": "1.1.19", | ||
"description": "The missing documentation tool for your Angular application", | ||
@@ -17,3 +17,3 @@ "main": "dist/index.js", | ||
"*********UTILS********": "*******************", | ||
"changelog": " auto-changelog -o CH.md --template tools/changelog-template.hbs -u", | ||
"changelog": "auto-changelog -o CH.md --template tools/changelog-template.hbs -u", | ||
"angularexpo": "npm run pretest && node tools/tests-angularexpo.js", | ||
@@ -72,12 +72,12 @@ "download-api-list": "node tools/download-api-list.js", | ||
"dependencies": { | ||
"@angular-devkit/schematics": "^13.1.2", | ||
"@babel/core": "^7.16.7", | ||
"@babel/preset-env": "^7.16.7", | ||
"@angular-devkit/schematics": "^13.2.4", | ||
"@babel/core": "^7.17.5", | ||
"@babel/preset-env": "^7.16.11", | ||
"@compodoc/live-server": "^1.2.3", | ||
"@compodoc/ngd-transformer": "^2.1.0", | ||
"chalk": "^4.1.2", | ||
"chalk": "4.1.2", | ||
"cheerio": "^1.0.0-rc.10", | ||
"chokidar": "^3.5.2", | ||
"chokidar": "^3.5.3", | ||
"colors": "1.4.0", | ||
"commander": "^8.3.0", | ||
"commander": "^9.0.0", | ||
"cosmiconfig": "^7.0.1", | ||
@@ -87,7 +87,7 @@ "decache": "^4.6.1", | ||
"findit2": "^2.2.3", | ||
"fs-extra": "^10.0.0", | ||
"fs-extra": "^10.0.1", | ||
"glob": "^7.2.0", | ||
"handlebars": "^4.7.7", | ||
"html-entities": "^2.3.2", | ||
"i18next": "^21.6.5", | ||
"i18next": "^21.6.11", | ||
"inside": "^1.0.0", | ||
@@ -99,3 +99,3 @@ "json5": "^2.2.0", | ||
"lunr": "^2.3.9", | ||
"marked": "^4.0.9", | ||
"marked": "^4.0.12", | ||
"minimist": "^1.2.5", | ||
@@ -108,3 +108,3 @@ "opencollective-postinstall": "^2.0.3", | ||
"traverse": "^0.6.6", | ||
"ts-morph": "^13.0.2", | ||
"ts-morph": "^13.0.3", | ||
"uuid": "^8.3.2" | ||
@@ -111,0 +111,0 @@ }, |
@@ -18,3 +18,3 @@ import { IDep } from '../dependencies.interfaces'; | ||
const hash = crypto.createHash('sha512').update(sourceCode).digest('hex'); | ||
let infos: IControllerDep = { | ||
const infos: IControllerDep = { | ||
name, | ||
@@ -36,2 +36,5 @@ id: 'controller-' + name + '-' + hash, | ||
} | ||
if (IO.extends) { | ||
infos.extends = IO.extends; | ||
} | ||
return infos; | ||
@@ -50,2 +53,3 @@ } | ||
deprecationMessage: string; | ||
extends?: any; | ||
} |
@@ -12,5 +12,5 @@ import { IDep } from '../dependencies.interfaces'; | ||
public create(file: any, srcFile: any, name: any, props: any, IO: any): IDirectiveDep { | ||
let sourceCode = srcFile.getText(); | ||
let hash = crypto.createHash('sha512').update(sourceCode).digest('hex'); | ||
let directiveDeps: IDirectiveDep = { | ||
const sourceCode = srcFile.getText(); | ||
const hash = crypto.createHash('sha512').update(sourceCode).digest('hex'); | ||
const directiveDeps: IDirectiveDep = { | ||
name, | ||
@@ -45,2 +45,5 @@ id: 'directive-' + name + '-' + hash, | ||
} | ||
if (IO.extends) { | ||
directiveDeps.extends = IO.extends; | ||
} | ||
if (IO.implements && IO.implements.length > 0) { | ||
@@ -85,2 +88,3 @@ directiveDeps.implements = IO.implements; | ||
accessors?: Object; | ||
extends?: any; | ||
} |
@@ -728,2 +728,6 @@ import * as _ from 'lodash'; | ||
if (this.isInternal(member) && Configuration.mainData.disableInternal) { | ||
continue; | ||
} | ||
if (inputDecorator && inputDecorator.length > 0) { | ||
@@ -1219,3 +1223,13 @@ inputs.push(this.visitInputAndHostBinding(member, inputDecorator[0], sourceFile)); | ||
for (i; i < len; i++) { | ||
if (this.isPublic(constr.parameters[i])) { | ||
const parameterOfConstructor = constr.parameters[i]; | ||
if (isIgnore(parameterOfConstructor)) { | ||
continue; | ||
} | ||
if ( | ||
this.isInternal(parameterOfConstructor) && | ||
Configuration.mainData.disableInternal | ||
) { | ||
continue; | ||
} | ||
if (this.isPublic(parameterOfConstructor)) { | ||
_parameters.push(this.visitProperty(constr.parameters[i], sourceFile)); | ||
@@ -1493,3 +1507,3 @@ } | ||
if (property.parameters[0].type) { | ||
_return.type = kindToType(property.parameters[0].type.kind); | ||
_return.type = this.visitType(property.parameters[0].type); | ||
} | ||
@@ -1496,0 +1510,0 @@ } |
@@ -69,2 +69,3 @@ import * as _ from 'lodash'; | ||
disableDependencies: COMPODOC_DEFAULTS.disableDependencies, | ||
disableProperties: COMPODOC_DEFAULTS.disableProperties, | ||
watch: false, | ||
@@ -88,2 +89,3 @@ mainGraph: '', | ||
packagePeerDependencies: [], | ||
packageProperties: {}, | ||
gaID: '', | ||
@@ -90,0 +92,0 @@ gaSite: '', |
@@ -6,2 +6,3 @@ import * as Handlebars from 'handlebars'; | ||
import { BreakLinesHelper } from './html-engine-helpers/break-lines.helper'; | ||
import { CapitalizeHelper } from './html-engine-helpers/capitalize.helper'; | ||
import { CleanParagraphHelper } from './html-engine-helpers/clean-paragraph.helper'; | ||
@@ -37,2 +38,3 @@ import { CompareHelper } from './html-engine-helpers/compare.helper'; | ||
import { ParseDescriptionHelper } from './html-engine-helpers/parse-description.helper'; | ||
import { ParsePropertyHelper } from './html-engine-helpers/parse-property.helper'; | ||
import { RelativeURLHelper } from './html-engine-helpers/relative-url.helper'; | ||
@@ -78,6 +80,8 @@ import { ShortURLHelper } from './html-engine-helpers/short-url.helper'; | ||
this.registerHelper(bars, 't', new I18nHelper()); | ||
this.registerHelper(bars, 'capitalize', new CapitalizeHelper()); | ||
this.registerHelper(bars, 'parse-property', new ParsePropertyHelper()); | ||
} | ||
private registerHelper(bars, key: string, helper: IHtmlEngineHelper) { | ||
Handlebars.registerHelper(key, function() { | ||
Handlebars.registerHelper(key, function () { | ||
// tslint:disable-next-line:no-invalid-this | ||
@@ -84,0 +88,0 @@ return helper.helperFunc.apply(helper, [this, ..._.slice(arguments as any)]); |
@@ -66,3 +66,4 @@ import * as Handlebars from 'handlebars'; | ||
'additional-page', | ||
'package-dependencies' | ||
'package-dependencies', | ||
'package-properties' | ||
]; | ||
@@ -69,0 +70,0 @@ if (templatePath) { |
@@ -40,2 +40,3 @@ export interface ConfigurationFileInterface { | ||
disableDependencies: boolean; | ||
disableProperties: boolean; | ||
minimal: boolean; | ||
@@ -42,0 +43,0 @@ customFavicon: string; |
@@ -60,2 +60,3 @@ import { CoverageData } from './coverageData.interface'; | ||
disableDependencies: boolean; | ||
disableProperties: boolean; | ||
watch: boolean; | ||
@@ -79,2 +80,3 @@ mainGraph: string; | ||
packagePeerDependencies: Object[]; | ||
packageProperties: any; | ||
gaID: string; | ||
@@ -81,0 +83,0 @@ gaSite: string; |
@@ -287,2 +287,9 @@ { | ||
}, | ||
"disableProperties": { | ||
"$id": "/properties/disableProperties", | ||
"type": "boolean", | ||
"title": "Do not add the properties list", | ||
"default": false, | ||
"examples": [false] | ||
}, | ||
"minimal": { | ||
@@ -289,0 +296,0 @@ "$id": "/properties/minimal", |
@@ -178,2 +178,7 @@ import * as fs from 'fs-extra'; | ||
.option( | ||
'--disableProperties', | ||
'Do not add the properties list', | ||
COMPODOC_DEFAULTS.disableProperties | ||
) | ||
.option( | ||
'--minimal', | ||
@@ -524,2 +529,9 @@ 'Minimal mode with only documentation. No search, no graph, no coverage.', | ||
if (configFile.disableProperties) { | ||
Configuration.mainData.disableProperties = configFile.disableProperties; | ||
} | ||
if (programOptions.disableProperties) { | ||
Configuration.mainData.disableProperties = programOptions.disableProperties; | ||
} | ||
if (configFile.minimal) { | ||
@@ -526,0 +538,0 @@ Configuration.mainData.disableSearch = true; |
@@ -80,4 +80,5 @@ document.addEventListener('DOMContentLoaded', function () { | ||
processMenuLinks(indexLinks, true); | ||
var entityLogos = document.querySelectorAll('[data-type="compodoc-logo"]'); | ||
var processLogos = function (entityLogo) { | ||
var compodocLogos = document.querySelectorAll('[data-type="compodoc-logo"]'); | ||
var customLogo = document.querySelectorAll('[data-type="custom-logo"]'); | ||
var processLogos = function (entityLogos) { | ||
for (var i = 0; i < entityLogos.length; i++) { | ||
@@ -89,3 +90,3 @@ var entityLogo = entityLogos[i]; | ||
let isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches; | ||
if (isDarkMode) { | ||
if (isDarkMode && url.indexOf('compodoc') !== -1) { | ||
url = 'images/compodoc-vectorise-inverted.png'; | ||
@@ -120,3 +121,4 @@ } | ||
}; | ||
processLogos(entityLogos); | ||
processLogos(compodocLogos); | ||
processLogos(customLogo); | ||
@@ -123,0 +125,0 @@ setTimeout(function () { |
@@ -30,2 +30,3 @@ export const COMPODOC_DEFAULTS = { | ||
disableDependencies: false, | ||
disableProperties: false, | ||
PAGE_TYPES: { | ||
@@ -32,0 +33,0 @@ ROOT: 'root', |
@@ -11,2 +11,3 @@ import { cloneDeep, concat, find } from 'lodash'; | ||
private directives; | ||
private controllers; | ||
@@ -27,4 +28,5 @@ private static instance: ExtendsMerger; | ||
this.directives = deps.directives; | ||
this.controllers = deps.controllers; | ||
this.components.forEach(component => { | ||
const mergeExtendedProperties = component => { | ||
let ext; | ||
@@ -122,4 +124,8 @@ if (typeof component.extends !== 'undefined') { | ||
} | ||
}); | ||
}; | ||
this.components.forEach(mergeExtendedProperties); | ||
this.directives.forEach(mergeExtendedProperties); | ||
this.controllers.forEach(mergeExtendedProperties); | ||
const mergeExtendedClasses = el => { | ||
@@ -157,2 +163,4 @@ let ext; | ||
this.injectables.forEach(mergeExtendedClasses); | ||
this.directives.forEach(mergeExtendedClasses); | ||
this.controllers.forEach(mergeExtendedClasses); | ||
@@ -192,3 +200,4 @@ return deps; | ||
this.injectables, | ||
this.directives | ||
this.directives, | ||
this.controllers | ||
); | ||
@@ -195,0 +204,0 @@ const result = find(mergedData, { name: name } as any); |
@@ -99,3 +99,5 @@ import * as _ from 'lodash'; | ||
let inCode = false; | ||
function readLine(line: string) { | ||
let inExample = false; // first line with @example, end line with empty string or string or */ | ||
let nbLines = 0; | ||
function readLine(line: string, index: number) { | ||
line = line.replace(/^\s*\*? ?/, ''); | ||
@@ -108,2 +110,12 @@ line = line.replace(/\s*$/, ''); | ||
if (line.indexOf('@example') !== -1) { | ||
inExample = true; | ||
line = '```html'; | ||
} | ||
if (inExample && line === '') { | ||
inExample = false; | ||
line = '```'; | ||
} | ||
if (!inCode) { | ||
@@ -128,2 +140,4 @@ const tag = /^@(\S+)/.exec(line); | ||
nbLines = text.split(/\r\n?|\n/).length; | ||
text.split(/\r\n?|\n/).forEach(readLine); | ||
@@ -278,4 +292,11 @@ | ||
let text = JSDocNode.name.escapedText; | ||
if (text === undefined && JSDocNode.name.left && JSDocNode.name.right) { | ||
text = JSDocNode.name.left.escapedText + '.' + JSDocNode.name.right.escapedText; | ||
if ( | ||
text === undefined && | ||
JSDocNode.name.left && | ||
JSDocNode.name.right | ||
) { | ||
text = | ||
JSDocNode.name.left.escapedText + | ||
'.' + | ||
JSDocNode.name.right.escapedText; | ||
} | ||
@@ -282,0 +303,0 @@ rawDescription += JSDocNode.text + '{@link ' + text + '}'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
7
1
8984488
446
60323
+ Addedcommander@9.5.0(transitive)
- Removedcommander@8.3.0(transitive)
Updated@babel/core@^7.17.5
Updated@babel/preset-env@^7.16.11
Updatedchalk@4.1.2
Updatedchokidar@^3.5.3
Updatedcommander@^9.0.0
Updatedfs-extra@^10.0.1
Updatedi18next@^21.6.11
Updatedmarked@^4.0.12
Updatedts-morph@^13.0.3