typedoc 0.14.1 → 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.
@@ -142,7 +142,7 @@ let Application = Application_1 = class Application extends component_1.Childabl
142
142
  ].join(typescript.sys.newLine);
143
143
  }
144
144
  };
145
- Application.VERSION = '0.14.1';
145
+ Application.VERSION = '0.14.2';
146
146
  __decorate([
147
147
  component_1.Option({
148
148
  name: 'logger',
@@ -39,6 +39,7 @@ let TypedocReader = TypedocReader_1 = class TypedocReader extends options_1.Opti
39
39
  file && this.load(event, file);
40
40
  }
41
41
  findTypedocFile(path) {
42
+ path = Path.resolve(path);
42
43
  if (FS.existsSync(path) && FS.statSync(path).isFile()) {
43
44
  return path;
44
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"typedoc.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/readers/typedoc.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAA6B;AAC7B,yBAAyB;AACzB,4BAA4B;AAE5B,+CAAoD;AACpD,wCAA8E;AAC9E,gDAA8D;AAM9D,IAAa,aAAa,qBAA1B,MAAa,aAAc,SAAQ,0BAAgB;IAc/C,UAAU;QACN,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,uBAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;IAC7E,CAAC;IAED,UAAU,CAAC,KAAoB;QAE3B,IAAI,KAAK,CAAC,IAAI,KAAK,yBAAe,CAAC,KAAK,EAAE;YACtC,OAAO;SACV;QAED,IAAI,IAAwB,CAAC;QAE7B,IAAI,eAAa,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,EAAE;YACzC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,eAAa,CAAC,WAAW,CAAC,CAAC;YAEjD,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;gBACzB,IAA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E;YAC7B,KAAK,CAAC,QAAQ,CAAC,sFAAsF,EAAE,UAAU,CAAC,CAAC;SACtH;aAAM;YACH,IAAI,IAAI,CAAC,GAAG,EAAE;gBACV,IAAI,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,EAAE;oBAC9B,KAAK,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACjC;qBAAM,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;oBAC5B,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC;iBAC/B;qBAAM;oBACH,KAAK,CAAC,QAAQ,CAAC,0EAA0E,EAAE,UAAU,CAAC,CAAC;iBAC1G;gBAED,OAAO,IAAI,CAAC,GAAG,CAAC;aACnB;YAED,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SACpC;IACL,CAAC;CACJ,CAAA;AAtFkB,yBAAW,GAAG,SAAS,CAAC;AALvC;IANC,kBAAM,CAAC;QACJ,IAAI,EAAE,eAAa,CAAC,WAAW;QAC/B,IAAI,EAAE,iIAAiI;QACvI,IAAI,EAAE,2BAAa,CAAC,MAAM;QAC1B,IAAI,EAAE,2BAAa,CAAC,IAAI;KAC3B,CAAC;8CACe;AAPR,aAAa;IADzB,qBAAS,CAAC,EAAC,IAAI,EAAE,iBAAiB,EAAC,CAAC;GACxB,aAAa,CAkGzB;AAlGY,sCAAa","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\nimport * as _ from 'lodash';\n\nimport { Component, Option } from '../../component';\nimport { OptionsComponent, OptionsReadMode, DiscoverEvent } from '../options';\nimport { ParameterType, ParameterHint } from '../declaration';\n\n/**\n * Obtains option values from typedoc.js\n */\n@Component({name: 'options:typedoc'})\nexport class TypedocReader extends OptionsComponent {\n @Option({\n name: TypedocReader.OPTIONS_KEY,\n help: 'Specify a js option file that should be loaded. If not specified TypeDoc will look for \\'typedoc.js\\' in the current directory.',\n type: ParameterType.String,\n hint: ParameterHint.File\n })\n options!: string;\n\n /**\n * The name of the parameter that specifies the options file.\n */\n private static OPTIONS_KEY = 'options';\n\n initialize() {\n this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -150);\n }\n\n onDiscover(event: DiscoverEvent) {\n // Do nothing until were fetching options\n if (event.mode !== OptionsReadMode.Fetch) {\n return;\n }\n\n let file: string | undefined;\n\n if (TypedocReader.OPTIONS_KEY in event.data) {\n let opts = event.data[TypedocReader.OPTIONS_KEY];\n\n if (opts && opts[0] === '.') {\n opts = Path.resolve(opts);\n }\n\n file = this.findTypedocFile(opts);\n\n if (!file || !FS.existsSync(file)) {\n event.addError('The options file could not be found with the given path %s.', opts);\n return;\n }\n } else if (this.application.isCLI) {\n file = this.findTypedocFile(process.cwd());\n }\n\n file && this.load(event, file);\n }\n\n /**\n * Search for the typedoc.js or typedoc.json file from the given path\n *\n * @param path Path to the typedoc.(js|json) file. If path is a directory\n * typedoc file will be attempted to be found at the root of this path\n * @return the typedoc.(js|json) file path or undefined\n */\n findTypedocFile(path: string): string | undefined {\n if (FS.existsSync(path) && FS.statSync(path).isFile()) {\n return path;\n }\n\n let file = Path.join(path, 'typedoc.js');\n if (FS.existsSync(file)) {\n return file;\n }\n\n file += 'on'; // look for JSON file\n return FS.existsSync(file) ? file : undefined;\n }\n\n /**\n * Load the specified option file.\n *\n * @param event The event object from the DISCOVER event.\n * @param optionFile The absolute path and file name of the option file.\n * @returns TRUE on success, otherwise FALSE.\n */\n load(event: DiscoverEvent, optionFile: string) {\n let data = require(optionFile);\n if (typeof data === 'function') {\n data = data(this.application);\n }\n\n if (!(typeof data === 'object')) {\n event.addError('The option file %s could not be read, it must either export a function or an object.', optionFile);\n } else {\n if (data.src) {\n if (typeof data.src === 'string') {\n event.inputFiles = [data.src];\n } else if (_.isArray(data.src)) {\n event.inputFiles = data.src;\n } else {\n event.addError('The property \\'src\\' of the option file %s must be a string or an array.', optionFile);\n }\n\n delete data.src;\n }\n\n _.defaultsDeep(event.data, data);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"typedoc.js","sourceRoot":"","sources":["../../../../../src/lib/utils/options/readers/typedoc.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAA6B;AAC7B,yBAAyB;AACzB,4BAA4B;AAE5B,+CAAoD;AACpD,wCAA8E;AAC9E,gDAA8D;AAM9D,IAAa,aAAa,qBAA1B,MAAa,aAAc,SAAQ,0BAAgB;IAc/C,UAAU;QACN,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,uBAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;IAC7E,CAAC;IAED,UAAU,CAAC,KAAoB;QAE3B,IAAI,KAAK,CAAC,IAAI,KAAK,yBAAe,CAAC,KAAK,EAAE;YACtC,OAAO;SACV;QAED,IAAI,IAAwB,CAAC;QAE7B,IAAI,eAAa,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,EAAE;YACzC,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,eAAa,CAAC,WAAW,CAAC,CAAC;YAEjD,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;gBACzB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;aAC7B;YAED,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YAElC,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;gBAC/B,KAAK,CAAC,QAAQ,CAAC,6DAA6D,EAAE,IAAI,CAAC,CAAC;gBACpF,OAAO;aACV;SACJ;aAAM,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;YAC/B,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;SAC9C;QAED,IAA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C;iBAC/B;qBAAM;oBACH,KAAK,CAAC,QAAQ,CAAC,0EAA0E,EAAE,UAAU,CAAC,CAAC;iBAC1G;gBAED,OAAO,IAAI,CAAC,GAAG,CAAC;aACnB;YAED,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SACpC;IACL,CAAC;CACJ,CAAA;AAxFkB,yBAAW,GAAG,SAAS,CAAC;AALvC;IANC,kBAAM,CAAC;QACJ,IAAI,EAAE,eAAa,CAAC,WAAW;QAC/B,IAAI,EAAE,iIAAiI;QACvI,IAAI,EAAE,2BAAa,CAAC,MAAM;QAC1B,IAAI,EAAE,2BAAa,CAAC,IAAI;KAC3B,CAAC;8CACe;AAPR,aAAa;IADzB,qBAAS,CAAC,EAAC,IAAI,EAAE,iBAAiB,EAAC,CAAC;GACxB,aAAa,CAoGzB;AApGY,sCAAa","sourcesContent":["import * as Path from 'path';\nimport * as FS from 'fs';\nimport * as _ from 'lodash';\n\nimport { Component, Option } from '../../component';\nimport { OptionsComponent, OptionsReadMode, DiscoverEvent } from '../options';\nimport { ParameterType, ParameterHint } from '../declaration';\n\n/**\n * Obtains option values from typedoc.js\n */\n@Component({name: 'options:typedoc'})\nexport class TypedocReader extends OptionsComponent {\n @Option({\n name: TypedocReader.OPTIONS_KEY,\n help: 'Specify a js option file that should be loaded. If not specified TypeDoc will look for \\'typedoc.js\\' in the current directory.',\n type: ParameterType.String,\n hint: ParameterHint.File\n })\n options!: string;\n\n /**\n * The name of the parameter that specifies the options file.\n */\n private static OPTIONS_KEY = 'options';\n\n initialize() {\n this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -150);\n }\n\n onDiscover(event: DiscoverEvent) {\n // Do nothing until were fetching options\n if (event.mode !== OptionsReadMode.Fetch) {\n return;\n }\n\n let file: string | undefined;\n\n if (TypedocReader.OPTIONS_KEY in event.data) {\n let opts = event.data[TypedocReader.OPTIONS_KEY];\n\n if (opts && opts[0] === '.') {\n opts = Path.resolve(opts);\n }\n\n file = this.findTypedocFile(opts);\n\n if (!file || !FS.existsSync(file)) {\n event.addError('The options file could not be found with the given path %s.', opts);\n return;\n }\n } else if (this.application.isCLI) {\n file = this.findTypedocFile(process.cwd());\n }\n\n file && this.load(event, file);\n }\n\n /**\n * Search for the typedoc.js or typedoc.json file from the given path\n *\n * @param path Path to the typedoc.(js|json) file. If path is a directory\n * typedoc file will be attempted to be found at the root of this path\n * @return the typedoc.(js|json) file path or undefined\n */\n findTypedocFile(path: string): string | undefined {\n path = Path.resolve(path);\n\n if (FS.existsSync(path) && FS.statSync(path).isFile()) {\n return path;\n }\n\n let file = Path.join(path, 'typedoc.js');\n if (FS.existsSync(file)) {\n return file;\n }\n\n file += 'on'; // look for JSON file\n return FS.existsSync(file) ? file : undefined;\n }\n\n /**\n * Load the specified option file.\n *\n * @param event The event object from the DISCOVER event.\n * @param optionFile The absolute path and file name of the option file.\n * @returns TRUE on success, otherwise FALSE.\n */\n load(event: DiscoverEvent, optionFile: string) {\n let data = require(optionFile);\n if (typeof data === 'function') {\n data = data(this.application);\n }\n\n if (!(typeof data === 'object')) {\n event.addError('The option file %s could not be read, it must either export a function or an object.', optionFile);\n } else {\n if (data.src) {\n if (typeof data.src === 'string') {\n event.inputFiles = [data.src];\n } else if (_.isArray(data.src)) {\n event.inputFiles = data.src;\n } else {\n event.addError('The property \\'src\\' of the option file %s must be a string or an array.', optionFile);\n }\n\n delete data.src;\n }\n\n _.defaultsDeep(event.data, data);\n }\n }\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typedoc",
3
3
  "description": "Create api documentations for typescript projects.",
4
- "version": "0.14.1",
4
+ "version": "0.14.2",
5
5
  "homepage": "http://typedoc.org",
6
6
  "main": "dist/index.js",
7
7
  "typings": "dist/index.d.ts",
@@ -39,7 +39,7 @@
39
39
  "@types/shelljs": "^0.8.0",
40
40
  "fs-extra": "^7.0.0",
41
41
  "handlebars": "^4.0.6",
42
- "highlight.js": "9.12.0",
42
+ "highlight.js": "^9.13.1",
43
43
  "lodash": "^4.17.10",
44
44
  "marked": "^0.4.0",
45
45
  "minimatch": "^3.0.0",