typedoc 0.13.0-0 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/application.d.ts +1 -1
- package/dist/lib/application.js +89 -112
- package/dist/lib/application.js.map +1 -1
- package/dist/lib/cli.js +46 -69
- package/dist/lib/cli.js.map +1 -1
- package/dist/lib/converter/components.d.ts +5 -5
- package/dist/lib/converter/components.js +10 -36
- package/dist/lib/converter/components.js.map +1 -1
- package/dist/lib/converter/context.d.ts +15 -15
- package/dist/lib/converter/context.js +67 -72
- package/dist/lib/converter/context.js.map +1 -1
- package/dist/lib/converter/convert-expression.d.ts +1 -1
- package/dist/lib/converter/convert-expression.js +4 -4
- package/dist/lib/converter/convert-expression.js.map +1 -1
- package/dist/lib/converter/converter.d.ts +5 -4
- package/dist/lib/converter/converter.js +149 -156
- package/dist/lib/converter/converter.js.map +1 -1
- package/dist/lib/converter/factories/comment.d.ts +2 -2
- package/dist/lib/converter/factories/comment.js +25 -26
- package/dist/lib/converter/factories/comment.js.map +1 -1
- package/dist/lib/converter/factories/declaration.d.ts +1 -1
- package/dist/lib/converter/factories/declaration.js +29 -29
- package/dist/lib/converter/factories/declaration.js.map +1 -1
- package/dist/lib/converter/factories/parameter.d.ts +1 -1
- package/dist/lib/converter/factories/parameter.js +11 -8
- package/dist/lib/converter/factories/parameter.js.map +1 -1
- package/dist/lib/converter/factories/reference.d.ts +1 -1
- package/dist/lib/converter/factories/reference.js +7 -4
- package/dist/lib/converter/factories/reference.js.map +1 -1
- package/dist/lib/converter/factories/signature.js +15 -17
- package/dist/lib/converter/factories/signature.js.map +1 -1
- package/dist/lib/converter/factories/type-parameter.d.ts +1 -1
- package/dist/lib/converter/factories/type-parameter.js +8 -6
- package/dist/lib/converter/factories/type-parameter.js.map +1 -1
- package/dist/lib/converter/nodes/accessor.d.ts +1 -1
- package/dist/lib/converter/nodes/accessor.js +16 -32
- package/dist/lib/converter/nodes/accessor.js.map +1 -1
- package/dist/lib/converter/nodes/alias.d.ts +1 -1
- package/dist/lib/converter/nodes/alias.js +17 -34
- package/dist/lib/converter/nodes/alias.js.map +1 -1
- package/dist/lib/converter/nodes/block.d.ts +1 -1
- package/dist/lib/converter/nodes/block.js +46 -64
- package/dist/lib/converter/nodes/block.js.map +1 -1
- package/dist/lib/converter/nodes/class.d.ts +1 -1
- package/dist/lib/converter/nodes/class.js +35 -53
- package/dist/lib/converter/nodes/class.js.map +1 -1
- package/dist/lib/converter/nodes/constructor.d.ts +1 -1
- package/dist/lib/converter/nodes/constructor.js +31 -48
- package/dist/lib/converter/nodes/constructor.js.map +1 -1
- package/dist/lib/converter/nodes/enum.d.ts +1 -1
- package/dist/lib/converter/nodes/enum.js +22 -40
- package/dist/lib/converter/nodes/enum.js.map +1 -1
- package/dist/lib/converter/nodes/export.js +19 -35
- package/dist/lib/converter/nodes/export.js.map +1 -1
- package/dist/lib/converter/nodes/function.d.ts +1 -1
- package/dist/lib/converter/nodes/function.js +22 -38
- package/dist/lib/converter/nodes/function.js.map +1 -1
- package/dist/lib/converter/nodes/interface.d.ts +1 -1
- package/dist/lib/converter/nodes/interface.js +27 -41
- package/dist/lib/converter/nodes/interface.js.map +1 -1
- package/dist/lib/converter/nodes/literal-object.js +14 -31
- package/dist/lib/converter/nodes/literal-object.js.map +1 -1
- package/dist/lib/converter/nodes/literal-type.js +14 -31
- package/dist/lib/converter/nodes/literal-type.js.map +1 -1
- package/dist/lib/converter/nodes/module.d.ts +1 -1
- package/dist/lib/converter/nodes/module.js +19 -39
- package/dist/lib/converter/nodes/module.js.map +1 -1
- package/dist/lib/converter/nodes/signature-call.js +17 -33
- package/dist/lib/converter/nodes/signature-call.js.map +1 -1
- package/dist/lib/converter/nodes/signature-index.js +15 -31
- package/dist/lib/converter/nodes/signature-index.js.map +1 -1
- package/dist/lib/converter/nodes/variable-statement.js +21 -39
- package/dist/lib/converter/nodes/variable-statement.js.map +1 -1
- package/dist/lib/converter/nodes/variable.d.ts +1 -1
- package/dist/lib/converter/nodes/variable.js +35 -51
- package/dist/lib/converter/nodes/variable.js.map +1 -1
- package/dist/lib/converter/plugins/CategoryPlugin.d.ts +1 -1
- package/dist/lib/converter/plugins/CategoryPlugin.js +45 -65
- package/dist/lib/converter/plugins/CategoryPlugin.js.map +1 -1
- package/dist/lib/converter/plugins/CommentPlugin.d.ts +4 -3
- package/dist/lib/converter/plugins/CommentPlugin.js +100 -106
- package/dist/lib/converter/plugins/CommentPlugin.js.map +1 -1
- package/dist/lib/converter/plugins/DecoratorPlugin.js +42 -62
- package/dist/lib/converter/plugins/DecoratorPlugin.js.map +1 -1
- package/dist/lib/converter/plugins/DeepCommentPlugin.js +20 -38
- package/dist/lib/converter/plugins/DeepCommentPlugin.js.map +1 -1
- package/dist/lib/converter/plugins/DynamicModulePlugin.js +33 -51
- package/dist/lib/converter/plugins/DynamicModulePlugin.js.map +1 -1
- package/dist/lib/converter/plugins/GitHubPlugin.d.ts +12 -0
- package/dist/lib/converter/plugins/GitHubPlugin.js +75 -94
- package/dist/lib/converter/plugins/GitHubPlugin.js.map +1 -1
- package/dist/lib/converter/plugins/GroupPlugin.js +88 -108
- package/dist/lib/converter/plugins/GroupPlugin.js.map +1 -1
- package/dist/lib/converter/plugins/ImplementsPlugin.js +30 -50
- package/dist/lib/converter/plugins/ImplementsPlugin.js.map +1 -1
- package/dist/lib/converter/plugins/PackagePlugin.d.ts +3 -3
- package/dist/lib/converter/plugins/PackagePlugin.js +40 -60
- package/dist/lib/converter/plugins/PackagePlugin.js.map +1 -1
- package/dist/lib/converter/plugins/SourcePlugin.js +61 -80
- package/dist/lib/converter/plugins/SourcePlugin.js.map +1 -1
- package/dist/lib/converter/plugins/TypePlugin.js +37 -55
- package/dist/lib/converter/plugins/TypePlugin.js.map +1 -1
- package/dist/lib/converter/types/alias.js +22 -39
- package/dist/lib/converter/types/alias.js.map +1 -1
- package/dist/lib/converter/types/array.d.ts +2 -2
- package/dist/lib/converter/types/array.js +24 -38
- package/dist/lib/converter/types/array.js.map +1 -1
- package/dist/lib/converter/types/binding-array.js +13 -35
- package/dist/lib/converter/types/binding-array.js.map +1 -1
- package/dist/lib/converter/types/binding-object.js +18 -40
- package/dist/lib/converter/types/binding-object.js.map +1 -1
- package/dist/lib/converter/types/enum.d.ts +1 -1
- package/dist/lib/converter/types/enum.js +12 -30
- package/dist/lib/converter/types/enum.js.map +1 -1
- package/dist/lib/converter/types/intrinsic.js +14 -32
- package/dist/lib/converter/types/intrinsic.js.map +1 -1
- package/dist/lib/converter/types/reference.d.ts +2 -2
- package/dist/lib/converter/types/reference.js +41 -64
- package/dist/lib/converter/types/reference.js.map +1 -1
- package/dist/lib/converter/types/string-literal.js +16 -34
- package/dist/lib/converter/types/string-literal.js.map +1 -1
- package/dist/lib/converter/types/this.js +12 -30
- package/dist/lib/converter/types/this.js.map +1 -1
- package/dist/lib/converter/types/tuple.js +25 -49
- package/dist/lib/converter/types/tuple.js.map +1 -1
- package/dist/lib/converter/types/type-operator.d.ts +1 -1
- package/dist/lib/converter/types/type-operator.js +19 -33
- package/dist/lib/converter/types/type-operator.js.map +1 -1
- package/dist/lib/converter/types/type-parameter.d.ts +1 -1
- package/dist/lib/converter/types/type-parameter.js +20 -38
- package/dist/lib/converter/types/type-parameter.js.map +1 -1
- package/dist/lib/converter/types/union-or-intersection.js +20 -52
- package/dist/lib/converter/types/union-or-intersection.js.map +1 -1
- package/dist/lib/converter/types/unknown.js +15 -31
- package/dist/lib/converter/types/unknown.js.map +1 -1
- package/dist/lib/converter/utils/base-path.js +21 -22
- package/dist/lib/converter/utils/base-path.js.map +1 -1
- package/dist/lib/converter/utils/compiler-host.d.ts +3 -3
- package/dist/lib/converter/utils/compiler-host.js +29 -47
- package/dist/lib/converter/utils/compiler-host.js.map +1 -1
- package/dist/lib/models/ReflectionCategory.js +16 -18
- package/dist/lib/models/ReflectionCategory.js.map +1 -1
- package/dist/lib/models/ReflectionGroup.d.ts +6 -6
- package/dist/lib/models/ReflectionGroup.js +16 -18
- package/dist/lib/models/ReflectionGroup.js.map +1 -1
- package/dist/lib/models/comments/comment.d.ts +3 -3
- package/dist/lib/models/comments/comment.js +21 -29
- package/dist/lib/models/comments/comment.js.map +1 -1
- package/dist/lib/models/comments/tag.js +6 -7
- package/dist/lib/models/comments/tag.js.map +1 -1
- package/dist/lib/models/reflections/abstract.d.ts +37 -35
- package/dist/lib/models/reflections/abstract.js +154 -143
- package/dist/lib/models/reflections/abstract.js.map +1 -1
- package/dist/lib/models/reflections/container.d.ts +3 -3
- package/dist/lib/models/reflections/container.js +24 -49
- package/dist/lib/models/reflections/container.js.map +1 -1
- package/dist/lib/models/reflections/declaration.d.ts +15 -15
- package/dist/lib/models/reflections/declaration.js +29 -47
- package/dist/lib/models/reflections/declaration.js.map +1 -1
- package/dist/lib/models/reflections/parameter.d.ts +3 -3
- package/dist/lib/models/reflections/parameter.js +13 -31
- package/dist/lib/models/reflections/parameter.js.map +1 -1
- package/dist/lib/models/reflections/project.d.ts +2 -2
- package/dist/lib/models/reflections/project.js +36 -53
- package/dist/lib/models/reflections/project.js.map +1 -1
- package/dist/lib/models/reflections/signature.d.ts +7 -7
- package/dist/lib/models/reflections/signature.js +24 -39
- package/dist/lib/models/reflections/signature.js.map +1 -1
- package/dist/lib/models/reflections/type-parameter.d.ts +3 -3
- package/dist/lib/models/reflections/type-parameter.js +9 -25
- package/dist/lib/models/reflections/type-parameter.js.map +1 -1
- package/dist/lib/models/sources/directory.d.ts +6 -6
- package/dist/lib/models/sources/directory.js +12 -17
- package/dist/lib/models/sources/directory.js.map +1 -1
- package/dist/lib/models/sources/file.d.ts +4 -4
- package/dist/lib/models/sources/file.js +4 -5
- package/dist/lib/models/sources/file.js.map +1 -1
- package/dist/lib/models/types/abstract.d.ts +1 -1
- package/dist/lib/models/types/abstract.js +18 -19
- package/dist/lib/models/types/abstract.js.map +1 -1
- package/dist/lib/models/types/array.js +17 -33
- package/dist/lib/models/types/array.js.map +1 -1
- package/dist/lib/models/types/intersection.js +20 -36
- package/dist/lib/models/types/intersection.js.map +1 -1
- package/dist/lib/models/types/intrinsic.js +16 -32
- package/dist/lib/models/types/intrinsic.js.map +1 -1
- package/dist/lib/models/types/reference.d.ts +2 -2
- package/dist/lib/models/types/reference.js +26 -42
- package/dist/lib/models/types/reference.js.map +1 -1
- package/dist/lib/models/types/reflection.js +16 -32
- package/dist/lib/models/types/reflection.js.map +1 -1
- package/dist/lib/models/types/string-literal.js +16 -32
- package/dist/lib/models/types/string-literal.js.map +1 -1
- package/dist/lib/models/types/tuple.js +19 -35
- package/dist/lib/models/types/tuple.js.map +1 -1
- package/dist/lib/models/types/type-operator.d.ts +1 -1
- package/dist/lib/models/types/type-operator.js +18 -34
- package/dist/lib/models/types/type-operator.js.map +1 -1
- package/dist/lib/models/types/type-parameter.d.ts +3 -2
- package/dist/lib/models/types/type-parameter.js +17 -33
- package/dist/lib/models/types/type-parameter.js.map +1 -1
- package/dist/lib/models/types/union.js +20 -36
- package/dist/lib/models/types/union.js.map +1 -1
- package/dist/lib/models/types/unknown.js +16 -32
- package/dist/lib/models/types/unknown.js.map +1 -1
- package/dist/lib/output/components.d.ts +2 -2
- package/dist/lib/output/components.js +25 -47
- package/dist/lib/output/components.js.map +1 -1
- package/dist/lib/output/events.d.ts +10 -8
- package/dist/lib/output/events.js +24 -42
- package/dist/lib/output/events.js.map +1 -1
- package/dist/lib/output/helpers/compact.js +2 -2
- package/dist/lib/output/helpers/compact.js.map +1 -1
- package/dist/lib/output/helpers/if-signature.js +1 -1
- package/dist/lib/output/helpers/if-signature.js.map +1 -1
- package/dist/lib/output/helpers/wbr.js +3 -3
- package/dist/lib/output/helpers/wbr.js.map +1 -1
- package/dist/lib/output/models/NavigationItem.d.ts +9 -9
- package/dist/lib/output/models/NavigationItem.js +8 -9
- package/dist/lib/output/models/NavigationItem.js.map +1 -1
- package/dist/lib/output/models/UrlMapping.js +3 -4
- package/dist/lib/output/models/UrlMapping.js.map +1 -1
- package/dist/lib/output/plugins/AssetsPlugin.js +24 -41
- package/dist/lib/output/plugins/AssetsPlugin.js.map +1 -1
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js +29 -45
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js.map +1 -1
- package/dist/lib/output/plugins/LayoutPlugin.js +12 -30
- package/dist/lib/output/plugins/LayoutPlugin.js.map +1 -1
- package/dist/lib/output/plugins/MarkedLinksPlugin.js +57 -84
- package/dist/lib/output/plugins/MarkedLinksPlugin.js.map +1 -1
- package/dist/lib/output/plugins/MarkedPlugin.d.ts +2 -2
- package/dist/lib/output/plugins/MarkedPlugin.js +58 -78
- package/dist/lib/output/plugins/MarkedPlugin.js.map +1 -1
- package/dist/lib/output/plugins/NavigationPlugin.js +22 -41
- package/dist/lib/output/plugins/NavigationPlugin.js.map +1 -1
- package/dist/lib/output/plugins/PrettyPrintPlugin.d.ts +23 -2
- package/dist/lib/output/plugins/PrettyPrintPlugin.js +50 -69
- package/dist/lib/output/plugins/PrettyPrintPlugin.js.map +1 -1
- package/dist/lib/output/plugins/TocPlugin.js +27 -47
- package/dist/lib/output/plugins/TocPlugin.js.map +1 -1
- package/dist/lib/output/renderer.d.ts +1 -1
- package/dist/lib/output/renderer.js +86 -108
- package/dist/lib/output/renderer.js.map +1 -1
- package/dist/lib/output/theme.d.ts +4 -4
- package/dist/lib/output/theme.js +12 -37
- package/dist/lib/output/theme.js.map +1 -1
- package/dist/lib/output/themes/DefaultTheme.d.ts +1 -1
- package/dist/lib/output/themes/DefaultTheme.js +102 -127
- package/dist/lib/output/themes/DefaultTheme.js.map +1 -1
- package/dist/lib/output/themes/MinimalTheme.js +27 -43
- package/dist/lib/output/themes/MinimalTheme.js.map +1 -1
- package/dist/lib/output/utils/resources/helpers.js +34 -56
- package/dist/lib/output/utils/resources/helpers.js.map +1 -1
- package/dist/lib/output/utils/resources/stack.d.ts +7 -7
- package/dist/lib/output/utils/resources/stack.js +78 -88
- package/dist/lib/output/utils/resources/stack.js.map +1 -1
- package/dist/lib/output/utils/resources/templates.d.ts +1 -1
- package/dist/lib/output/utils/resources/templates.js +35 -59
- package/dist/lib/output/utils/resources/templates.js.map +1 -1
- package/dist/lib/output/utils/resources.js +22 -22
- package/dist/lib/output/utils/resources.js.map +1 -1
- package/dist/lib/serialization/components.d.ts +4 -10
- package/dist/lib/serialization/components.js +21 -51
- package/dist/lib/serialization/components.js.map +1 -1
- package/dist/lib/serialization/events.d.ts +2 -1
- package/dist/lib/serialization/events.js +6 -20
- package/dist/lib/serialization/events.js.map +1 -1
- package/dist/lib/serialization/serializer.d.ts +1 -1
- package/dist/lib/serialization/serializer.js +45 -67
- package/dist/lib/serialization/serializer.js.map +1 -1
- package/dist/lib/serialization/serializers/comments/comment-tag.d.ts +2 -3
- package/dist/lib/serialization/serializers/comments/comment-tag.js +19 -39
- package/dist/lib/serialization/serializers/comments/comment-tag.js.map +1 -1
- package/dist/lib/serialization/serializers/comments/comment.d.ts +2 -3
- package/dist/lib/serialization/serializers/comments/comment.js +20 -41
- package/dist/lib/serialization/serializers/comments/comment.js.map +1 -1
- package/dist/lib/serialization/serializers/decorator.d.ts +2 -2
- package/dist/lib/serialization/serializers/decorator.js +23 -40
- package/dist/lib/serialization/serializers/decorator.js.map +1 -1
- package/dist/lib/serialization/serializers/models/decorator-wrapper.js +3 -4
- package/dist/lib/serialization/serializers/models/decorator-wrapper.js.map +1 -1
- package/dist/lib/serialization/serializers/models/source-reference-wrapper.js +3 -4
- package/dist/lib/serialization/serializers/models/source-reference-wrapper.js.map +1 -1
- package/dist/lib/serialization/serializers/reflection-group.d.ts +2 -2
- package/dist/lib/serialization/serializers/reflection-group.js +23 -40
- package/dist/lib/serialization/serializers/reflection-group.js.map +1 -1
- package/dist/lib/serialization/serializers/reflections/abstract.d.ts +1 -1
- package/dist/lib/serialization/serializers/reflections/abstract.js +24 -55
- package/dist/lib/serialization/serializers/reflections/abstract.js.map +1 -1
- package/dist/lib/serialization/serializers/reflections/container.d.ts +1 -1
- package/dist/lib/serialization/serializers/reflections/container.js +16 -36
- package/dist/lib/serialization/serializers/reflections/container.js.map +1 -1
- package/dist/lib/serialization/serializers/reflections/declaration.d.ts +1 -1
- package/dist/lib/serialization/serializers/reflections/declaration.js +18 -38
- package/dist/lib/serialization/serializers/reflections/declaration.js.map +1 -1
- package/dist/lib/serialization/serializers/reflections/parameter.d.ts +1 -1
- package/dist/lib/serialization/serializers/reflections/parameter.js +12 -31
- package/dist/lib/serialization/serializers/reflections/parameter.js.map +1 -1
- package/dist/lib/serialization/serializers/reflections/project.d.ts +1 -1
- package/dist/lib/serialization/serializers/reflections/project.js +14 -33
- package/dist/lib/serialization/serializers/reflections/project.js.map +1 -1
- package/dist/lib/serialization/serializers/reflections/signature.d.ts +1 -1
- package/dist/lib/serialization/serializers/reflections/signature.js +12 -31
- package/dist/lib/serialization/serializers/reflections/signature.js.map +1 -1
- package/dist/lib/serialization/serializers/reflections/type-parameter.d.ts +1 -1
- package/dist/lib/serialization/serializers/reflections/type-parameter.js +12 -31
- package/dist/lib/serialization/serializers/reflections/type-parameter.js.map +1 -1
- package/dist/lib/serialization/serializers/sources/source-reference.d.ts +2 -2
- package/dist/lib/serialization/serializers/sources/source-reference.js +21 -36
- package/dist/lib/serialization/serializers/sources/source-reference.js.map +1 -1
- package/dist/lib/serialization/serializers/types/abstract.d.ts +1 -1
- package/dist/lib/serialization/serializers/types/abstract.js +13 -31
- package/dist/lib/serialization/serializers/types/abstract.js.map +1 -1
- package/dist/lib/serialization/serializers/types/array.d.ts +1 -1
- package/dist/lib/serialization/serializers/types/array.js +12 -31
- package/dist/lib/serialization/serializers/types/array.js.map +1 -1
- package/dist/lib/serialization/serializers/types/intersection-union.d.ts +1 -1
- package/dist/lib/serialization/serializers/types/intersection-union.js +13 -33
- package/dist/lib/serialization/serializers/types/intersection-union.js.map +1 -1
- package/dist/lib/serialization/serializers/types/intrinsic.d.ts +1 -1
- package/dist/lib/serialization/serializers/types/intrinsic.js +12 -31
- package/dist/lib/serialization/serializers/types/intrinsic.js.map +1 -1
- package/dist/lib/serialization/serializers/types/reference.d.ts +1 -1
- package/dist/lib/serialization/serializers/types/reference.js +13 -33
- package/dist/lib/serialization/serializers/types/reference.js.map +1 -1
- package/dist/lib/serialization/serializers/types/reflection.d.ts +2 -2
- package/dist/lib/serialization/serializers/types/reflection.js +12 -31
- package/dist/lib/serialization/serializers/types/reflection.js.map +1 -1
- package/dist/lib/serialization/serializers/types/string-literal.d.ts +1 -1
- package/dist/lib/serialization/serializers/types/string-literal.js +12 -31
- package/dist/lib/serialization/serializers/types/string-literal.js.map +1 -1
- package/dist/lib/serialization/serializers/types/tuple.d.ts +1 -1
- package/dist/lib/serialization/serializers/types/tuple.js +13 -33
- package/dist/lib/serialization/serializers/types/tuple.js.map +1 -1
- package/dist/lib/serialization/serializers/types/type-operator.d.ts +1 -1
- package/dist/lib/serialization/serializers/types/type-operator.js +12 -31
- package/dist/lib/serialization/serializers/types/type-operator.js.map +1 -1
- package/dist/lib/serialization/serializers/types/type-parameter.d.ts +1 -1
- package/dist/lib/serialization/serializers/types/type-parameter.js +12 -31
- package/dist/lib/serialization/serializers/types/type-parameter.js.map +1 -1
- package/dist/lib/serialization/serializers/types/unknown.d.ts +1 -1
- package/dist/lib/serialization/serializers/types/unknown.js +12 -31
- package/dist/lib/serialization/serializers/types/unknown.js.map +1 -1
- package/dist/lib/ts-internal.d.ts +23 -6
- package/dist/lib/ts-internal.js +3 -4
- package/dist/lib/ts-internal.js.map +1 -1
- package/dist/lib/utils/__events.d.ts +0 -0
- package/dist/lib/utils/__events.js +1 -0
- package/dist/lib/utils/__events.js.map +1 -0
- package/dist/lib/utils/component.d.ts +10 -9
- package/dist/lib/utils/component.js +74 -124
- package/dist/lib/utils/component.js.map +1 -1
- package/dist/lib/utils/events.d.ts +7 -6
- package/dist/lib/utils/events.js +74 -91
- package/dist/lib/utils/events.js.map +1 -1
- package/dist/lib/utils/fs.js +8 -8
- package/dist/lib/utils/fs.js.map +1 -1
- package/dist/lib/utils/loggers.js +43 -93
- package/dist/lib/utils/loggers.js.map +1 -1
- package/dist/lib/utils/options/declaration.d.ts +11 -8
- package/dist/lib/utils/options/declaration.js +23 -23
- package/dist/lib/utils/options/declaration.js.map +1 -1
- package/dist/lib/utils/options/help.js +23 -23
- package/dist/lib/utils/options/help.js.map +1 -1
- package/dist/lib/utils/options/options.d.ts +5 -4
- package/dist/lib/utils/options/options.js +76 -122
- package/dist/lib/utils/options/options.js.map +1 -1
- package/dist/lib/utils/options/readers/arguments.js +28 -46
- package/dist/lib/utils/options/readers/arguments.js.map +1 -1
- package/dist/lib/utils/options/readers/tsconfig.js +56 -66
- package/dist/lib/utils/options/readers/tsconfig.js.map +1 -1
- package/dist/lib/utils/options/readers/typedoc.d.ts +1 -0
- package/dist/lib/utils/options/readers/typedoc.js +51 -55
- package/dist/lib/utils/options/readers/typedoc.js.map +1 -1
- package/dist/lib/utils/options/sources/component.js +26 -48
- package/dist/lib/utils/options/sources/component.js.map +1 -1
- package/dist/lib/utils/options/sources/typescript.js +27 -48
- package/dist/lib/utils/options/sources/typescript.js.map +1 -1
- package/dist/lib/utils/paths.d.ts +2 -0
- package/dist/lib/utils/paths.js +21 -0
- package/dist/lib/utils/paths.js.map +1 -0
- package/dist/lib/utils/plugins.js +44 -61
- package/dist/lib/utils/plugins.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
[](https://travis-ci.org/TypeStrong/typedoc)
|
|
6
6
|
[](http://badge.fury.io/js/typedoc)
|
|
7
7
|
[](https://gitter.im/TypeStrong/typedoc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
8
|
-
[](https://greenkeeper.io/)
|
|
9
8
|
|
|
10
9
|
## Installation
|
|
11
10
|
|
|
@@ -123,13 +122,13 @@ There is a plugin available to run TypeDoc with Webpack created by Microsoft. Yo
|
|
|
123
122
|
### Gulp
|
|
124
123
|
|
|
125
124
|
There is a plugin available to run TypeDoc with Gulp created by Rogier Schouten. You can find it on NPM:<br>
|
|
126
|
-
[https://www.npmjs.
|
|
125
|
+
[https://www.npmjs.com/package/gulp-typedoc/](https://www.npmjs.com/package/gulp-typedoc/)
|
|
127
126
|
|
|
128
127
|
|
|
129
128
|
### Grunt
|
|
130
129
|
|
|
131
130
|
There is a plugin available to run TypeDoc with Grunt created by Bart van der Schoor. You can find it on NPM:<br>
|
|
132
|
-
[https://www.npmjs.
|
|
131
|
+
[https://www.npmjs.com/package/grunt-typedoc](https://www.npmjs.com/package/grunt-typedoc)
|
|
133
132
|
|
|
134
133
|
## Plugins
|
|
135
134
|
|
|
@@ -139,6 +138,9 @@ There is a plugin available to run TypeDoc with Grunt created by Bart van der Sc
|
|
|
139
138
|
* [Single Line Tags](https://github.com/christopherthielen/typedoc-plugin-single-line-tags) - Process certain `@tags` as single lines
|
|
140
139
|
* [Localization](https://github.com/IgniteUI/typedoc-plugin-localization) - Generate documentation for different languages
|
|
141
140
|
|
|
141
|
+
A list of all published Typedoc plugins can be found on NPM:<br>
|
|
142
|
+
[https://www.npmjs.com/search?q=keywords:typedocplugin](https://www.npmjs.com/search?q=keywords:typedocplugin)
|
|
143
|
+
|
|
142
144
|
## Advanced guides and docs
|
|
143
145
|
|
|
144
146
|
Visit our homepage for advanced guides and an extensive API documentation:<br>
|
|
@@ -151,7 +153,7 @@ This project is maintained by a community of developers. Contributions are welco
|
|
|
151
153
|
You can find TypeDoc on GitHub; feel free to start an issue or create a pull requests:<br>
|
|
152
154
|
[https://github.com/TypeStrong/typedoc](https://github.com/TypeStrong/typedoc)
|
|
153
155
|
|
|
154
|
-
For more information, read the [contribution guide](https://github.com/TypeStrong/typedoc/
|
|
156
|
+
For more information, read the [contribution guide](https://github.com/TypeStrong/typedoc/blob/master/CONTRIBUTING.md).
|
|
155
157
|
|
|
156
158
|
|
|
157
159
|
## License
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Application } from './lib/application';
|
|
2
2
|
export { CliApplication } from './lib/cli';
|
|
3
3
|
export { EventDispatcher, Event } from './lib/utils/events';
|
|
4
|
+
export { createMinimatch } from './lib/utils/paths';
|
|
4
5
|
export { resetReflectionID } from './lib/models/reflections/abstract';
|
|
5
6
|
export { normalizePath } from './lib/utils/fs';
|
|
6
7
|
export * from './lib/models/reflections';
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,8 @@ exports.CliApplication = cli_1.CliApplication;
|
|
|
10
10
|
var events_1 = require("./lib/utils/events");
|
|
11
11
|
exports.EventDispatcher = events_1.EventDispatcher;
|
|
12
12
|
exports.Event = events_1.Event;
|
|
13
|
+
var paths_1 = require("./lib/utils/paths");
|
|
14
|
+
exports.createMinimatch = paths_1.createMinimatch;
|
|
13
15
|
var abstract_1 = require("./lib/models/reflections/abstract");
|
|
14
16
|
exports.resetReflectionID = abstract_1.resetReflectionID;
|
|
15
17
|
var fs_1 = require("./lib/utils/fs");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,iDAAgD;AAAvC,oCAAA,WAAW,CAAA;AACpB,iCAA2C;AAAlC,+BAAA,cAAc,CAAA;AAEvB,6CAA4D;AAAnD,mCAAA,eAAe,CAAA;AAAE,yBAAA,KAAK,CAAA;AAC/B,8DAAsE;AAA7D,uCAAA,iBAAiB,CAAA;AAC1B,qCAA+C;AAAtC,6BAAA,aAAa,CAAA;AACtB,8CAAyC;AACzC,0CAAqC;AACrC,kDAAiD;AAAxC,8BAAA,QAAQ,CAAA;AACjB,iEAAgE;AAAvD,sCAAA,YAAY,CAAA;AACrB,qEAAoE;AAA3D,0CAAA,cAAc,CAAA;AACvB,6DAA4D;AAAnD,kCAAA,UAAU,CAAA","sourcesContent":["export { Application } from './lib/application';\nexport { CliApplication } from './lib/cli';\n\nexport { EventDispatcher, Event } from './lib/utils/events';\nexport { resetReflectionID } from './lib/models/reflections/abstract';\nexport { normalizePath } from './lib/utils/fs';\nexport * from './lib/models/reflections';\nexport * from './lib/output/plugins';\nexport { Renderer } from './lib/output/renderer';\nexport { DefaultTheme } from './lib/output/themes/DefaultTheme';\nexport { NavigationItem } from './lib/output/models/NavigationItem';\nexport { UrlMapping } from './lib/output/models/UrlMapping';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,iDAAgD;AAAvC,oCAAA,WAAW,CAAA;AACpB,iCAA2C;AAAlC,+BAAA,cAAc,CAAA;AAEvB,6CAA4D;AAAnD,mCAAA,eAAe,CAAA;AAAE,yBAAA,KAAK,CAAA;AAC/B,2CAAoD;AAA3C,kCAAA,eAAe,CAAA;AACxB,8DAAsE;AAA7D,uCAAA,iBAAiB,CAAA;AAC1B,qCAA+C;AAAtC,6BAAA,aAAa,CAAA;AACtB,8CAAyC;AACzC,0CAAqC;AACrC,kDAAiD;AAAxC,8BAAA,QAAQ,CAAA;AACjB,iEAAgE;AAAvD,sCAAA,YAAY,CAAA;AACrB,qEAAoE;AAA3D,0CAAA,cAAc,CAAA;AACvB,6DAA4D;AAAnD,kCAAA,UAAU,CAAA","sourcesContent":["export { Application } from './lib/application';\nexport { CliApplication } from './lib/cli';\n\nexport { EventDispatcher, Event } from './lib/utils/events';\nexport { createMinimatch } from './lib/utils/paths';\nexport { resetReflectionID } from './lib/models/reflections/abstract';\nexport { normalizePath } from './lib/utils/fs';\nexport * from './lib/models/reflections';\nexport * from './lib/output/plugins';\nexport { Renderer } from './lib/output/renderer';\nexport { DefaultTheme } from './lib/output/themes/DefaultTheme';\nexport { NavigationItem } from './lib/output/models/NavigationItem';\nexport { UrlMapping } from './lib/output/models/UrlMapping';\n"]}
|
|
@@ -22,7 +22,7 @@ export declare class Application extends ChildableComponent<Application, Abstrac
|
|
|
22
22
|
readonly isCLI: boolean;
|
|
23
23
|
getTypeScriptPath(): string;
|
|
24
24
|
getTypeScriptVersion(): string;
|
|
25
|
-
convert(src: string[]): ProjectReflection;
|
|
25
|
+
convert(src: string[]): ProjectReflection | undefined;
|
|
26
26
|
generateDocs(src: string[], out: string): boolean;
|
|
27
27
|
generateDocs(project: ProjectReflection, out: string): boolean;
|
|
28
28
|
generateJson(src: string[], out: string): boolean;
|
package/dist/lib/application.js
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
}
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -19,35 +6,33 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
19
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
7
|
};
|
|
21
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return _this;
|
|
9
|
+
var Application_1;
|
|
10
|
+
const Path = require("path");
|
|
11
|
+
const FS = require("fs");
|
|
12
|
+
const typescript = require("typescript");
|
|
13
|
+
const index_1 = require("./converter/index");
|
|
14
|
+
const renderer_1 = require("./output/renderer");
|
|
15
|
+
const serialization_1 = require("./serialization");
|
|
16
|
+
const index_2 = require("./models/index");
|
|
17
|
+
const index_3 = require("./utils/index");
|
|
18
|
+
const paths_1 = require("./utils/paths");
|
|
19
|
+
const component_1 = require("./utils/component");
|
|
20
|
+
const index_4 = require("./utils/options/index");
|
|
21
|
+
const declaration_1 = require("./utils/options/declaration");
|
|
22
|
+
let Application = Application_1 = class Application extends component_1.ChildableComponent {
|
|
23
|
+
constructor(options) {
|
|
24
|
+
super(component_1.DUMMY_APPLICATION_OWNER);
|
|
25
|
+
this.logger = new index_3.ConsoleLogger();
|
|
26
|
+
this.converter = this.addComponent('converter', index_1.Converter);
|
|
27
|
+
this.serializer = this.addComponent('serializer', serialization_1.Serializer);
|
|
28
|
+
this.renderer = this.addComponent('renderer', renderer_1.Renderer);
|
|
29
|
+
this.plugins = this.addComponent('plugins', index_3.PluginHost);
|
|
30
|
+
this.options = this.addComponent('options', index_4.Options);
|
|
31
|
+
this.bootstrap(options);
|
|
46
32
|
}
|
|
47
|
-
|
|
48
|
-
Application.prototype.bootstrap = function (options) {
|
|
33
|
+
bootstrap(options) {
|
|
49
34
|
this.options.read(options, index_4.OptionsReadMode.Prefetch);
|
|
50
|
-
|
|
35
|
+
const logger = this.loggerType;
|
|
51
36
|
if (typeof logger === 'function') {
|
|
52
37
|
this.logger = new index_3.CallbackLogger(logger);
|
|
53
38
|
}
|
|
@@ -56,32 +41,24 @@ var Application = (function (_super) {
|
|
|
56
41
|
}
|
|
57
42
|
this.plugins.load();
|
|
58
43
|
return this.options.read(this.options.getRawValues(), index_4.OptionsReadMode.Fetch);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Object.defineProperty(Application.prototype, "isCLI", {
|
|
68
|
-
get: function () {
|
|
69
|
-
return false;
|
|
70
|
-
},
|
|
71
|
-
enumerable: true,
|
|
72
|
-
configurable: true
|
|
73
|
-
});
|
|
74
|
-
Application.prototype.getTypeScriptPath = function () {
|
|
44
|
+
}
|
|
45
|
+
get application() {
|
|
46
|
+
return this;
|
|
47
|
+
}
|
|
48
|
+
get isCLI() {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
getTypeScriptPath() {
|
|
75
52
|
return Path.dirname(require.resolve('typescript'));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
53
|
+
}
|
|
54
|
+
getTypeScriptVersion() {
|
|
55
|
+
const tsPath = this.getTypeScriptPath();
|
|
56
|
+
const json = JSON.parse(FS.readFileSync(Path.join(tsPath, '..', 'package.json'), 'utf8'));
|
|
80
57
|
return json.version;
|
|
81
|
-
}
|
|
82
|
-
|
|
58
|
+
}
|
|
59
|
+
convert(src) {
|
|
83
60
|
this.logger.writeln('Using TypeScript %s from %s', this.getTypeScriptVersion(), this.getTypeScriptPath());
|
|
84
|
-
|
|
61
|
+
const result = this.converter.convert(src);
|
|
85
62
|
if (result.errors && result.errors.length) {
|
|
86
63
|
this.logger.diagnostics(result.errors);
|
|
87
64
|
if (this.ignoreCompilerErrors) {
|
|
@@ -89,15 +66,15 @@ var Application = (function (_super) {
|
|
|
89
66
|
return result.project;
|
|
90
67
|
}
|
|
91
68
|
else {
|
|
92
|
-
return
|
|
69
|
+
return;
|
|
93
70
|
}
|
|
94
71
|
}
|
|
95
72
|
else {
|
|
96
73
|
return result.project;
|
|
97
74
|
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
75
|
+
}
|
|
76
|
+
generateDocs(input, out) {
|
|
77
|
+
const project = input instanceof index_2.ProjectReflection ? input : this.convert(input);
|
|
101
78
|
if (!project) {
|
|
102
79
|
return false;
|
|
103
80
|
}
|
|
@@ -110,28 +87,30 @@ var Application = (function (_super) {
|
|
|
110
87
|
this.logger.success('Documentation generated at %s', out);
|
|
111
88
|
}
|
|
112
89
|
return true;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
90
|
+
}
|
|
91
|
+
generateJson(input, out) {
|
|
92
|
+
const project = input instanceof index_2.ProjectReflection ? input : this.convert(input);
|
|
116
93
|
if (!project) {
|
|
117
94
|
return false;
|
|
118
95
|
}
|
|
119
96
|
out = Path.resolve(out);
|
|
120
|
-
|
|
121
|
-
|
|
97
|
+
const eventData = { outputDirectory: Path.dirname(out), outputFile: Path.basename(out) };
|
|
98
|
+
const ser = this.serializer.projectToObject(project, { begin: eventData, end: eventData });
|
|
122
99
|
index_3.writeFile(out, JSON.stringify(ser, null, '\t'), false);
|
|
123
100
|
this.logger.success('JSON written to %s', out);
|
|
124
101
|
return true;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
102
|
+
}
|
|
103
|
+
expandInputFiles(inputFiles = []) {
|
|
104
|
+
let files = [];
|
|
105
|
+
const exclude = this.exclude
|
|
106
|
+
? paths_1.createMinimatch(this.exclude)
|
|
107
|
+
: [];
|
|
129
108
|
function isExcluded(fileName) {
|
|
130
|
-
return exclude.some(
|
|
109
|
+
return exclude.some(mm => mm.match(fileName));
|
|
131
110
|
}
|
|
132
111
|
function add(dirname) {
|
|
133
|
-
FS.readdirSync(dirname).forEach(
|
|
134
|
-
|
|
112
|
+
FS.readdirSync(dirname).forEach((file) => {
|
|
113
|
+
const realpath = Path.join(dirname, file);
|
|
135
114
|
if (FS.statSync(realpath).isDirectory()) {
|
|
136
115
|
add(realpath);
|
|
137
116
|
}
|
|
@@ -143,7 +122,7 @@ var Application = (function (_super) {
|
|
|
143
122
|
}
|
|
144
123
|
});
|
|
145
124
|
}
|
|
146
|
-
inputFiles.forEach(
|
|
125
|
+
inputFiles.forEach((file) => {
|
|
147
126
|
file = Path.resolve(file);
|
|
148
127
|
if (FS.statSync(file).isDirectory()) {
|
|
149
128
|
add(file);
|
|
@@ -153,43 +132,41 @@ var Application = (function (_super) {
|
|
|
153
132
|
}
|
|
154
133
|
});
|
|
155
134
|
return files;
|
|
156
|
-
}
|
|
157
|
-
|
|
135
|
+
}
|
|
136
|
+
toString() {
|
|
158
137
|
return [
|
|
159
138
|
'',
|
|
160
139
|
'TypeDoc ' + Application_1.VERSION,
|
|
161
140
|
'Using TypeScript ' + this.getTypeScriptVersion() + ' from ' + this.getTypeScriptPath(),
|
|
162
141
|
''
|
|
163
142
|
].join(typescript.sys.newLine);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
return Application;
|
|
193
|
-
}(component_1.ChildableComponent));
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
Application.VERSION = '0.14.2';
|
|
146
|
+
__decorate([
|
|
147
|
+
component_1.Option({
|
|
148
|
+
name: 'logger',
|
|
149
|
+
help: 'Specify the logger that should be used, \'none\' or \'console\'',
|
|
150
|
+
defaultValue: 'console',
|
|
151
|
+
type: declaration_1.ParameterType.Mixed
|
|
152
|
+
})
|
|
153
|
+
], Application.prototype, "loggerType", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
component_1.Option({
|
|
156
|
+
name: 'ignoreCompilerErrors',
|
|
157
|
+
help: 'Should TypeDoc generate documentation pages even after the compiler has returned errors?',
|
|
158
|
+
type: declaration_1.ParameterType.Boolean
|
|
159
|
+
})
|
|
160
|
+
], Application.prototype, "ignoreCompilerErrors", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
component_1.Option({
|
|
163
|
+
name: 'exclude',
|
|
164
|
+
help: 'Define patterns for excluded files when specifying paths.',
|
|
165
|
+
type: declaration_1.ParameterType.Array
|
|
166
|
+
})
|
|
167
|
+
], Application.prototype, "exclude", void 0);
|
|
168
|
+
Application = Application_1 = __decorate([
|
|
169
|
+
component_1.Component({ name: 'application', internal: true })
|
|
170
|
+
], Application);
|
|
194
171
|
exports.Application = Application;
|
|
195
172
|
//# sourceMappingURL=application.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/lib/application.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQA,2BAA6B;AAC7B,uBAAyB;AACzB,uCAAyC;AACzC,uCAAkD;AAElD,2CAA8C;AAC9C,8CAA6C;AAC7C,iDAA6C;AAC7C,wCAAmD;AACnD,uCAA6F;AAE7F,+CAA6F;AAC7F,+CAAoF;AACpF,2DAA4D;AAiB5D;IAAiC,+BAA+D;IAyD5F,qBAAY,OAAgB;QAA5B,YACI,kBAAM,IAAI,CAAC,SAUd;QARG,KAAI,CAAC,MAAM,GAAM,IAAI,qBAAa,EAAE,CAAC;QACrC,KAAI,CAAC,SAAS,GAAG,KAAI,CAAC,YAAY,CAAY,WAAW,EAAE,iBAAS,CAAC,CAAC;QACtE,KAAI,CAAC,UAAU,GAAG,KAAI,CAAC,YAAY,CAAa,YAAY,EAAE,0BAAU,CAAC,CAAC;QAC1E,KAAI,CAAC,QAAQ,GAAI,KAAI,CAAC,YAAY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AO;YAChC,mBAAmB,GAAG,IAAI,CAAC,oBAAoB,EAAE,GAAG,QAAQ,GAAG,IAAI,CAAC,iBAAiB,EAAE;YACvF,EAAE;SACL,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;;IA7MM,mBAAO,GAAG,eAAe,CAAC;IAnBjC;QANC,kBAAM,CAAC;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,iEAAiE;YACvE,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,2BAAa,CAAC,KAAK;SAC5B,CAAC;mDAC0B;IAO5B;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,0FAA0F;YAChG,IAAI,EAAE,2BAAa,CAAC,OAAO;SAC9B,CAAC;6DAC4B;IAO9B;QALC,kBAAM,CAAC;YACJ,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,2DAA2D;YACjE,IAAI,EAAE,2BAAa,CAAC,KAAK;SAC5B,CAAC;gDACqB;IA7Cd,WAAW;QADvB,qBAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;OACpC,WAAW,CAgQvB;IAAD,kBAAC;CAAA,AAhQD,CAAiC,8BAAkB,GAgQlD;AAhQY,kCAAW","sourcesContent":["/**\n * The TypeDoc main module and namespace.\n *\n * The [[Application]] class holds the core logic of the cli application. All code related\n * to resolving reflections is stored in [[TypeDoc.Factories]], the actual data models can be found\n * in [[TypeDoc.Models]] and the final rendering is defined in [[TypeDoc.Output]].\n */\n\nimport * as Path from 'path';\nimport * as FS from 'fs';\nimport * as typescript from 'typescript';\nimport { Minimatch, IMinimatch } from 'minimatch';\n\nimport { Converter } from './converter/index';\nimport { Renderer } from './output/renderer';\nimport { Serializer } from './serialization';\nimport { ProjectReflection } from './models/index';\nimport { Logger, ConsoleLogger, CallbackLogger, PluginHost, writeFile } from './utils/index';\n\nimport { AbstractComponent, ChildableComponent, Component, Option } from './utils/component';\nimport { Options, OptionsReadMode, OptionsReadResult } from './utils/options/index';\nimport { ParameterType } from './utils/options/declaration';\n\n/**\n * The default TypeDoc main application class.\n *\n * This class holds the two main components of TypeDoc, the [[Dispatcher]] and\n * the [[Renderer]]. When running TypeDoc, first the [[Dispatcher]] is invoked which\n * generates a [[ProjectReflection]] from the passed in source files. The\n * [[ProjectReflection]] is a hierarchical model representation of the TypeScript\n * project. Afterwards the model is passed to the [[Renderer]] which uses an instance\n * of [[BaseTheme]] to generate the final documentation.\n *\n * Both the [[Dispatcher]] and the [[Renderer]] are subclasses of the [[EventDispatcher]]\n * and emit a series of events while processing the project. Subscribe to these Events\n * to control the application flow or alter the output.\n */\n@Component({name: 'application', internal: true})\nexport class Application extends ChildableComponent<Application, AbstractComponent<Application>> {\n options: Options;\n\n /**\n * The converter used to create the declaration reflections.\n */\n converter: Converter;\n\n /**\n * The renderer used to generate the documentation output.\n */\n renderer: Renderer;\n\n /**\n * The serializer used to generate JSON output.\n */\n serializer: Serializer;\n\n /**\n * The logger that should be used to output messages.\n */\n logger: Logger;\n\n plugins: PluginHost;\n\n @Option({\n name: 'logger',\n help: 'Specify the logger that should be used, \\'none\\' or \\'console\\'',\n defaultValue: 'console',\n type: ParameterType.Mixed\n })\n loggerType: string|Function;\n\n @Option({\n name: 'ignoreCompilerErrors',\n help: 'Should TypeDoc generate documentation pages even after the compiler has returned errors?',\n type: ParameterType.Boolean\n })\n ignoreCompilerErrors: boolean;\n\n @Option({\n name: 'exclude',\n help: 'Define patterns for excluded files when specifying paths.',\n type: ParameterType.Array\n })\n exclude: Array<string>;\n\n /**\n * The version number of TypeDoc.\n */\n static VERSION = '{{ VERSION }}';\n\n /**\n * Create a new TypeDoc application instance.\n *\n * @param options An object containing the options that should be used.\n */\n constructor(options?: Object) {\n super(null);\n\n this.logger = new ConsoleLogger();\n this.converter = this.addComponent<Converter>('converter', Converter);\n this.serializer = this.addComponent<Serializer>('serializer', Serializer);\n this.renderer = this.addComponent<Renderer>('renderer', Renderer);\n this.plugins = this.addComponent('plugins', PluginHost);\n this.options = this.addComponent('options', Options);\n\n this.bootstrap(options);\n }\n\n /**\n * Initialize TypeDoc with the given options object.\n *\n * @param options The desired options to set.\n */\n protected bootstrap(options?: Object): OptionsReadResult {\n this.options.read(options, OptionsReadMode.Prefetch);\n\n const logger = this.loggerType;\n if (typeof logger === 'function') {\n this.logger = new CallbackLogger(<any> logger);\n } else if (logger === 'none') {\n this.logger = new Logger();\n }\n\n this.plugins.load();\n return this.options.read(this.options.getRawValues(), OptionsReadMode.Fetch);\n }\n\n /**\n * Return the application / root component instance.\n */\n get application(): Application {\n return this;\n }\n\n get isCLI(): boolean {\n return false;\n }\n\n /**\n * Return the path to the TypeScript compiler.\n */\n public getTypeScriptPath(): string {\n return Path.dirname(require.resolve('typescript'));\n }\n\n public getTypeScriptVersion(): string {\n const tsPath = this.getTypeScriptPath();\n const json = JSON.parse(FS.readFileSync(Path.join(tsPath, '..', 'package.json'), 'utf8'));\n return json.version;\n }\n\n /**\n * Run the converter for the given set of files and return the generated reflections.\n *\n * @param src A list of source that should be compiled and converted.\n * @returns An instance of ProjectReflection on success, NULL otherwise.\n */\n public convert(src: string[]): ProjectReflection {\n this.logger.writeln('Using TypeScript %s from %s', this.getTypeScriptVersion(), this.getTypeScriptPath());\n\n const result = this.converter.convert(src);\n if (result.errors && result.errors.length) {\n this.logger.diagnostics(result.errors);\n if (this.ignoreCompilerErrors) {\n this.logger.resetErrors();\n return result.project;\n } else {\n return null;\n }\n } else {\n return result.project;\n }\n }\n\n /**\n * @param src A list of source files whose documentation should be generated.\n */\n public generateDocs(src: string[], out: string): boolean;\n\n /**\n * @param project The project the documentation should be generated for.\n */\n public generateDocs(project: ProjectReflection, out: string): boolean;\n\n /**\n * Run the documentation generator for the given set of files.\n *\n * @param out The path the documentation should be written to.\n * @returns TRUE if the documentation could be generated successfully, otherwise FALSE.\n */\n public generateDocs(input: any, out: string): boolean {\n const project = input instanceof ProjectReflection ? input : this.convert(input);\n if (!project) {\n return false;\n }\n\n out = Path.resolve(out);\n this.renderer.render(project, out);\n if (this.logger.hasErrors()) {\n this.logger.error('Documentation could not be generated due to the errors above.');\n } else {\n this.logger.success('Documentation generated at %s', out);\n }\n\n return true;\n }\n\n /**\n * @param src A list of source that should be compiled and converted.\n */\n public generateJson(src: string[], out: string): boolean;\n\n /**\n * @param project The project that should be converted.\n */\n public generateJson(project: ProjectReflection, out: string): boolean;\n\n /**\n * Run the converter for the given set of files and write the reflections to a json file.\n *\n * @param out The path and file name of the target file.\n * @returns TRUE if the json file could be written successfully, otherwise FALSE.\n */\n public generateJson(input: any, out: string): boolean {\n const project = input instanceof ProjectReflection ? input : this.convert(input);\n if (!project) {\n return false;\n }\n\n out = Path.resolve(out);\n const eventData = { outputDirectory: Path.dirname(out), outputFile: Path.basename(out) };\n const ser = this.serializer.projectToObject(project, { begin: eventData, end: eventData });\n writeFile(out, JSON.stringify(ser, null, '\\t'), false);\n this.logger.success('JSON written to %s', out);\n\n return true;\n }\n\n /**\n * Expand a list of input files.\n *\n * Searches for directories in the input files list and replaces them with a\n * listing of all TypeScript files within them. One may use the ```--exclude``` option\n * to filter out files with a pattern.\n *\n * @param inputFiles The list of files that should be expanded.\n * @returns The list of input files with expanded directories.\n */\n public expandInputFiles(inputFiles?: string[]): string[] {\n let files: string[] = [];\n const exclude: Array<IMinimatch> = this.exclude ? this.exclude.map(pattern => new Minimatch(pattern, {dot: true})) : [];\n\n function isExcluded(fileName: string): boolean {\n return exclude.some(mm => mm.match(fileName));\n }\n\n function add(dirname: string) {\n FS.readdirSync(dirname).forEach((file) => {\n const realpath = Path.join(dirname, file);\n if (FS.statSync(realpath).isDirectory()) {\n add(realpath);\n } else if (/\\.tsx?$/.test(realpath)) {\n if (isExcluded(realpath.replace(/\\\\/g, '/'))) {\n return;\n }\n\n files.push(realpath);\n }\n });\n }\n\n inputFiles.forEach((file) => {\n file = Path.resolve(file);\n if (FS.statSync(file).isDirectory()) {\n add(file);\n } else if (!isExcluded(file)) {\n files.push(file);\n }\n });\n\n return files;\n }\n\n /**\n * Print the version number.\n */\n public toString() {\n return [\n '',\n 'TypeDoc ' + Application.VERSION,\n 'Using TypeScript ' + this.getTypeScriptVersion() + ' from ' + this.getTypeScriptPath(),\n ''\n ].join(typescript.sys.newLine);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/lib/application.ts"],"names":[],"mappings":";;;;;;;;;AAQA,6BAA6B;AAC7B,yBAAyB;AACzB,yCAAyC;AAEzC,6CAA8C;AAC9C,gDAA6C;AAC7C,mDAA6C;AAC7C,0CAAmD;AACnD,yCAA6F;AAC7F,yCAAgD;AAEhD,iDAAsH;AACtH,iDAAoF;AACpF,6DAA4D;AAiB5D,IAAa,WAAW,mBAAxB,MAAa,WAAY,SAAQ,8BAA+D;IAyD5F,YAAY,OAAgB;QACxB,KAAK,CAAC,mCAAuB,CAAC,CAAC;QAE/B,IAAI,CAAC,MAAM,GAAM,IAAI,qBAAa,EAAE,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAY,WAAW,EAAE,iBAAS,CAAC,CAAC;QACtE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,YAAY,CAAa,YAAY,EAAE,0BAAU,CAAC,CAAC;QAC1E,IAAI,CAAC,QAAQ,GAAI,IAAI,CAAC,YAAY,CAAW,UAAU,EAAE,mBAAQ,CAAC,CAAC;QACnE,IAAI,CAAC,OAAO,GAAK,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,kBAAU,CAAC,CAAC;QAC1D,IAAI,CAAC,OAAO,GAAK,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,eAAO,CAAC,CAAC;QAEvD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAOS,SAAS,CAAC,OAAgB;QAChC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,O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,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,2DAA2D;QACjE,IAAI,EAAE,2BAAa,CAAC,KAAK;KAC5B,CAAC;4CACsB;AA7Cf,WAAW;IADvB,qBAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;GACpC,WAAW,CAmQvB;AAnQY,kCAAW","sourcesContent":["/**\n * The TypeDoc main module and namespace.\n *\n * The [[Application]] class holds the core logic of the cli application. All code related\n * to resolving reflections is stored in [[TypeDoc.Factories]], the actual data models can be found\n * in [[TypeDoc.Models]] and the final rendering is defined in [[TypeDoc.Output]].\n */\n\nimport * as Path from 'path';\nimport * as FS from 'fs';\nimport * as typescript from 'typescript';\n\nimport { Converter } from './converter/index';\nimport { Renderer } from './output/renderer';\nimport { Serializer } from './serialization';\nimport { ProjectReflection } from './models/index';\nimport { Logger, ConsoleLogger, CallbackLogger, PluginHost, writeFile } from './utils/index';\nimport { createMinimatch } from './utils/paths';\n\nimport { AbstractComponent, ChildableComponent, Component, Option, DUMMY_APPLICATION_OWNER } from './utils/component';\nimport { Options, OptionsReadMode, OptionsReadResult } from './utils/options/index';\nimport { ParameterType } from './utils/options/declaration';\n\n/**\n * The default TypeDoc main application class.\n *\n * This class holds the two main components of TypeDoc, the [[Dispatcher]] and\n * the [[Renderer]]. When running TypeDoc, first the [[Dispatcher]] is invoked which\n * generates a [[ProjectReflection]] from the passed in source files. The\n * [[ProjectReflection]] is a hierarchical model representation of the TypeScript\n * project. Afterwards the model is passed to the [[Renderer]] which uses an instance\n * of [[BaseTheme]] to generate the final documentation.\n *\n * Both the [[Dispatcher]] and the [[Renderer]] are subclasses of the [[EventDispatcher]]\n * and emit a series of events while processing the project. Subscribe to these Events\n * to control the application flow or alter the output.\n */\n@Component({name: 'application', internal: true})\nexport class Application extends ChildableComponent<Application, AbstractComponent<Application>> {\n options: Options;\n\n /**\n * The converter used to create the declaration reflections.\n */\n converter: Converter;\n\n /**\n * The renderer used to generate the documentation output.\n */\n renderer: Renderer;\n\n /**\n * The serializer used to generate JSON output.\n */\n serializer: Serializer;\n\n /**\n * The logger that should be used to output messages.\n */\n logger: Logger;\n\n plugins: PluginHost;\n\n @Option({\n name: 'logger',\n help: 'Specify the logger that should be used, \\'none\\' or \\'console\\'',\n defaultValue: 'console',\n type: ParameterType.Mixed\n })\n loggerType!: string|Function;\n\n @Option({\n name: 'ignoreCompilerErrors',\n help: 'Should TypeDoc generate documentation pages even after the compiler has returned errors?',\n type: ParameterType.Boolean\n })\n ignoreCompilerErrors!: boolean;\n\n @Option({\n name: 'exclude',\n help: 'Define patterns for excluded files when specifying paths.',\n type: ParameterType.Array\n })\n exclude!: Array<string>;\n\n /**\n * The version number of TypeDoc.\n */\n static VERSION = '{{ VERSION }}';\n\n /**\n * Create a new TypeDoc application instance.\n *\n * @param options An object containing the options that should be used.\n */\n constructor(options?: Object) {\n super(DUMMY_APPLICATION_OWNER);\n\n this.logger = new ConsoleLogger();\n this.converter = this.addComponent<Converter>('converter', Converter);\n this.serializer = this.addComponent<Serializer>('serializer', Serializer);\n this.renderer = this.addComponent<Renderer>('renderer', Renderer);\n this.plugins = this.addComponent('plugins', PluginHost);\n this.options = this.addComponent('options', Options);\n\n this.bootstrap(options);\n }\n\n /**\n * Initialize TypeDoc with the given options object.\n *\n * @param options The desired options to set.\n */\n protected bootstrap(options?: Object): OptionsReadResult {\n this.options.read(options, OptionsReadMode.Prefetch);\n\n const logger = this.loggerType;\n if (typeof logger === 'function') {\n this.logger = new CallbackLogger(<any> logger);\n } else if (logger === 'none') {\n this.logger = new Logger();\n }\n\n this.plugins.load();\n return this.options.read(this.options.getRawValues(), OptionsReadMode.Fetch);\n }\n\n /**\n * Return the application / root component instance.\n */\n get application(): Application {\n return this;\n }\n\n get isCLI(): boolean {\n return false;\n }\n\n /**\n * Return the path to the TypeScript compiler.\n */\n public getTypeScriptPath(): string {\n return Path.dirname(require.resolve('typescript'));\n }\n\n public getTypeScriptVersion(): string {\n const tsPath = this.getTypeScriptPath();\n const json = JSON.parse(FS.readFileSync(Path.join(tsPath, '..', 'package.json'), 'utf8'));\n return json.version;\n }\n\n /**\n * Run the converter for the given set of files and return the generated reflections.\n *\n * @param src A list of source that should be compiled and converted.\n * @returns An instance of ProjectReflection on success, undefined otherwise.\n */\n public convert(src: string[]): ProjectReflection | undefined {\n this.logger.writeln('Using TypeScript %s from %s', this.getTypeScriptVersion(), this.getTypeScriptPath());\n\n const result = this.converter.convert(src);\n if (result.errors && result.errors.length) {\n this.logger.diagnostics(result.errors);\n if (this.ignoreCompilerErrors) {\n this.logger.resetErrors();\n return result.project;\n } else {\n return;\n }\n } else {\n return result.project;\n }\n }\n\n /**\n * @param src A list of source files whose documentation should be generated.\n */\n public generateDocs(src: string[], out: string): boolean;\n\n /**\n * @param project The project the documentation should be generated for.\n */\n public generateDocs(project: ProjectReflection, out: string): boolean;\n\n /**\n * Run the documentation generator for the given set of files.\n *\n * @param out The path the documentation should be written to.\n * @returns TRUE if the documentation could be generated successfully, otherwise FALSE.\n */\n public generateDocs(input: ProjectReflection | string[], out: string): boolean {\n const project = input instanceof ProjectReflection ? input : this.convert(input);\n if (!project) {\n return false;\n }\n\n out = Path.resolve(out);\n this.renderer.render(project, out);\n if (this.logger.hasErrors()) {\n this.logger.error('Documentation could not be generated due to the errors above.');\n } else {\n this.logger.success('Documentation generated at %s', out);\n }\n\n return true;\n }\n\n /**\n * @param src A list of source that should be compiled and converted.\n */\n public generateJson(src: string[], out: string): boolean;\n\n /**\n * @param project The project that should be converted.\n */\n public generateJson(project: ProjectReflection, out: string): boolean;\n\n /**\n * Run the converter for the given set of files and write the reflections to a json file.\n *\n * @param out The path and file name of the target file.\n * @returns TRUE if the json file could be written successfully, otherwise FALSE.\n */\n public generateJson(input: any, out: string): boolean {\n const project = input instanceof ProjectReflection ? input : this.convert(input);\n if (!project) {\n return false;\n }\n\n out = Path.resolve(out);\n const eventData = { outputDirectory: Path.dirname(out), outputFile: Path.basename(out) };\n const ser = this.serializer.projectToObject(project, { begin: eventData, end: eventData });\n writeFile(out, JSON.stringify(ser, null, '\\t'), false);\n this.logger.success('JSON written to %s', out);\n\n return true;\n }\n\n /**\n * Expand a list of input files.\n *\n * Searches for directories in the input files list and replaces them with a\n * listing of all TypeScript files within them. One may use the ```--exclude``` option\n * to filter out files with a pattern.\n *\n * @param inputFiles The list of files that should be expanded.\n * @returns The list of input files with expanded directories.\n */\n public expandInputFiles(inputFiles: string[] = []): string[] {\n let files: string[] = [];\n\n const exclude = this.exclude\n ? createMinimatch(this.exclude)\n : [];\n\n function isExcluded(fileName: string): boolean {\n return exclude.some(mm => mm.match(fileName));\n }\n\n function add(dirname: string) {\n FS.readdirSync(dirname).forEach((file) => {\n const realpath = Path.join(dirname, file);\n if (FS.statSync(realpath).isDirectory()) {\n add(realpath);\n } else if (/\\.tsx?$/.test(realpath)) {\n if (isExcluded(realpath.replace(/\\\\/g, '/'))) {\n return;\n }\n\n files.push(realpath);\n }\n });\n }\n\n inputFiles.forEach((file) => {\n file = Path.resolve(file);\n if (FS.statSync(file).isDirectory()) {\n add(file);\n } else if (!isExcluded(file)) {\n files.push(file);\n }\n });\n\n return files;\n }\n\n /**\n * Print the version number.\n */\n public toString() {\n return [\n '',\n 'TypeDoc ' + Application.VERSION,\n 'Using TypeScript ' + this.getTypeScriptVersion() + ' from ' + this.getTypeScriptPath(),\n ''\n ].join(typescript.sys.newLine);\n }\n}\n"]}
|
package/dist/lib/cli.js
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
}
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
16
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -19,11 +6,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
19
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
7
|
};
|
|
21
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
const typescript = require("typescript");
|
|
10
|
+
const application_1 = require("./application");
|
|
11
|
+
const component_1 = require("./utils/component");
|
|
12
|
+
const declaration_1 = require("./utils/options/declaration");
|
|
13
|
+
const help_1 = require("./utils/options/help");
|
|
27
14
|
var ExitCode;
|
|
28
15
|
(function (ExitCode) {
|
|
29
16
|
ExitCode[ExitCode["OptionError"] = 1] = "OptionError";
|
|
@@ -32,16 +19,11 @@ var ExitCode;
|
|
|
32
19
|
ExitCode[ExitCode["CompileError"] = 4] = "CompileError";
|
|
33
20
|
ExitCode[ExitCode["OutputError"] = 5] = "OutputError";
|
|
34
21
|
})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
39
|
-
}
|
|
40
|
-
CliApplication.prototype.bootstrap = function (options) {
|
|
41
|
-
var result = _super.prototype.bootstrap.call(this, options);
|
|
22
|
+
class CliApplication extends application_1.Application {
|
|
23
|
+
bootstrap(options) {
|
|
24
|
+
const result = super.bootstrap(options);
|
|
42
25
|
if (result.hasErrors) {
|
|
43
|
-
process.exit(1);
|
|
44
|
-
return;
|
|
26
|
+
return process.exit(1);
|
|
45
27
|
}
|
|
46
28
|
if (this.version) {
|
|
47
29
|
typescript.sys.write(this.toString());
|
|
@@ -58,8 +40,8 @@ var CliApplication = (function (_super) {
|
|
|
58
40
|
process.exit(3);
|
|
59
41
|
}
|
|
60
42
|
else {
|
|
61
|
-
|
|
62
|
-
|
|
43
|
+
const src = this.expandInputFiles(result.inputFiles);
|
|
44
|
+
const project = this.convert(src);
|
|
63
45
|
if (project) {
|
|
64
46
|
if (this.out) {
|
|
65
47
|
this.generateDocs(project, this.out);
|
|
@@ -76,45 +58,40 @@ var CliApplication = (function (_super) {
|
|
|
76
58
|
}
|
|
77
59
|
}
|
|
78
60
|
return result;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
type: declaration_1.ParameterType.Boolean
|
|
115
|
-
})
|
|
116
|
-
], CliApplication.prototype, "help", void 0);
|
|
117
|
-
return CliApplication;
|
|
118
|
-
}(application_1.Application));
|
|
61
|
+
}
|
|
62
|
+
get isCLI() {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
__decorate([
|
|
67
|
+
component_1.Option({
|
|
68
|
+
name: 'out',
|
|
69
|
+
help: 'Specifies the location the documentation should be written to.',
|
|
70
|
+
hint: declaration_1.ParameterHint.Directory
|
|
71
|
+
})
|
|
72
|
+
], CliApplication.prototype, "out", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
component_1.Option({
|
|
75
|
+
name: 'json',
|
|
76
|
+
help: 'Specifies the location and file name a json file describing the project is written to.',
|
|
77
|
+
hint: declaration_1.ParameterHint.File
|
|
78
|
+
})
|
|
79
|
+
], CliApplication.prototype, "json", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
component_1.Option({
|
|
82
|
+
name: 'version',
|
|
83
|
+
short: 'v',
|
|
84
|
+
help: 'Print the TypeDoc\'s version.',
|
|
85
|
+
type: declaration_1.ParameterType.Boolean
|
|
86
|
+
})
|
|
87
|
+
], CliApplication.prototype, "version", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
component_1.Option({
|
|
90
|
+
name: 'help',
|
|
91
|
+
short: 'h',
|
|
92
|
+
help: 'Print this message.',
|
|
93
|
+
type: declaration_1.ParameterType.Boolean
|
|
94
|
+
})
|
|
95
|
+
], CliApplication.prototype, "help", void 0);
|
|
119
96
|
exports.CliApplication = CliApplication;
|
|
120
97
|
//# sourceMappingURL=cli.js.map
|
package/dist/lib/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/lib/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/lib/cli.ts"],"names":[],"mappings":";;;;;;;;AAAA,yCAAyC;AAEzC,+CAA4C;AAC5C,iDAA2C;AAE3C,6DAA2E;AAC3E,+CAAsD;AAEtD,IAAkB,QAMjB;AAND,WAAkB,QAAQ;IACtB,qDAAgB,CAAA;IAChB,uDAAgB,CAAA;IAChB,+CAAgB,CAAA;IAChB,uDAAgB,CAAA;IAChB,qDAAgB,CAAA;AACpB,CAAC,EANiB,QAAQ,GAAR,gBAAQ,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I,CAAC,IAAI,CAAC,CAAC;iBACzC;gBACD,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE;oBACzB,OAAO,CAAC,IAAI,GAAsB,CAAC;iBACtC;aACJ;iBAAM;gBACH,OAAO,CAAC,IAAI,GAAuB,CAAC;aACvC;SACJ;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AApEG;IALC,kBAAM,CAAC;QACJ,IAAI,EAAG,KAAK;QACZ,IAAI,EAAG,gEAAgE;QACvE,IAAI,EAAG,2BAAa,CAAC,SAAS;KACjC,CAAC;2CACW;AAOb;IALC,kBAAM,CAAC;QACJ,IAAI,EAAG,MAAM;QACb,IAAI,EAAG,wFAAwF;QAC/F,IAAI,EAAG,2BAAa,CAAC,IAAI;KAC5B,CAAC;4CACY;AAQd;IANC,kBAAM,CAAC;QACJ,IAAI,EAAG,SAAS;QAChB,KAAK,EAAE,GAAG;QACV,IAAI,EAAG,+BAA+B;QACtC,IAAI,EAAG,2BAAa,CAAC,OAAO;KAC/B,CAAC;+CACgB;AAQlB;IANC,kBAAM,CAAC;QACJ,IAAI,EAAG,MAAM;QACb,KAAK,EAAE,GAAG;QACV,IAAI,EAAG,qBAAqB;QAC5B,IAAI,EAAG,2BAAa,CAAC,OAAO;KAC/B,CAAC;4CACa;AA7BnB,wCA0EC","sourcesContent":["import * as typescript from 'typescript';\n\nimport { Application } from './application';\nimport { Option } from './utils/component';\nimport { OptionsReadResult } from './utils/options/options';\nimport { ParameterHint, ParameterType } from './utils/options/declaration';\nimport { getOptionsHelp } from './utils/options/help';\n\nexport const enum ExitCode {\n OptionError = 1,\n NoInputFiles = 2,\n NoOutput = 3,\n CompileError = 4,\n OutputError = 5\n}\n\nexport class CliApplication extends Application {\n @Option({\n name: 'out',\n help: 'Specifies the location the documentation should be written to.',\n hint: ParameterHint.Directory\n })\n out!: string;\n\n @Option({\n name: 'json',\n help: 'Specifies the location and file name a json file describing the project is written to.',\n hint: ParameterHint.File\n })\n json!: string;\n\n @Option({\n name: 'version',\n short: 'v',\n help: 'Print the TypeDoc\\'s version.',\n type: ParameterType.Boolean\n })\n version!: boolean;\n\n @Option({\n name: 'help',\n short: 'h',\n help: 'Print this message.',\n type: ParameterType.Boolean\n })\n help!: boolean;\n\n /**\n * Run TypeDoc from the command line.\n */\n protected bootstrap(options?: Object): OptionsReadResult {\n const result = super.bootstrap(options);\n if (result.hasErrors) {\n return process.exit(ExitCode.OptionError);\n }\n\n if (this.version) {\n typescript.sys.write(this.toString());\n } else if (this.help) {\n typescript.sys.write(getOptionsHelp(this.options));\n } else if (result.inputFiles.length === 0) {\n typescript.sys.write(getOptionsHelp(this.options));\n process.exit(ExitCode.NoInputFiles);\n } else if (!this.out && !this.json) {\n this.logger.error(\"You must either specify the 'out' or 'json' option.\");\n process.exit(ExitCode.NoOutput);\n } else {\n const src = this.expandInputFiles(result.inputFiles);\n const project = this.convert(src);\n if (project) {\n if (this.out) {\n this.generateDocs(project, this.out);\n }\n if (this.json) {\n this.generateJson(project, this.json);\n }\n if (this.logger.hasErrors()) {\n process.exit(ExitCode.OutputError);\n }\n } else {\n process.exit(ExitCode.CompileError);\n }\n }\n\n return result;\n }\n\n get isCLI(): boolean {\n return true;\n }\n}\n"]}
|
|
@@ -8,8 +8,8 @@ export { Component };
|
|
|
8
8
|
export declare abstract class ConverterComponent extends AbstractComponent<Converter> {
|
|
9
9
|
}
|
|
10
10
|
export declare abstract class ConverterNodeComponent<T extends ts.Node> extends ConverterComponent {
|
|
11
|
-
supports: ts.SyntaxKind[];
|
|
12
|
-
abstract convert(context: Context, node: T): Reflection;
|
|
11
|
+
abstract supports: ts.SyntaxKind[];
|
|
12
|
+
abstract convert(context: Context, node: T): Reflection | undefined;
|
|
13
13
|
}
|
|
14
14
|
export declare abstract class ConverterTypeComponent extends ConverterComponent {
|
|
15
15
|
priority: number;
|
|
@@ -18,9 +18,9 @@ export interface TypeConverter<T extends ts.Type, N extends ts.Node> extends Con
|
|
|
18
18
|
}
|
|
19
19
|
export interface TypeTypeConverter<T extends ts.Type> extends ConverterTypeComponent {
|
|
20
20
|
supportsType(context: Context, type: T): boolean;
|
|
21
|
-
convertType(context: Context, type: T): Type;
|
|
21
|
+
convertType(context: Context, type: T): Type | undefined;
|
|
22
22
|
}
|
|
23
23
|
export interface TypeNodeConverter<T extends ts.Type, N extends ts.Node> extends ConverterTypeComponent {
|
|
24
|
-
supportsNode(context: Context, node: N, type: T): boolean;
|
|
25
|
-
convertNode(context: Context, node: N, type: T): Type;
|
|
24
|
+
supportsNode(context: Context, node: N, type: T | undefined): boolean;
|
|
25
|
+
convertNode(context: Context, node: N, type: T | undefined): Type | undefined;
|
|
26
26
|
}
|