(folder: string)
| 2812 | } |
| 2813 | |
| 2814 | public runWebServer(folder: string) { |
| 2815 | if (!this.isWatching) { |
| 2816 | let documentationServerConfiguration: DocumentationServerConfiguration = { |
| 2817 | root: folder, |
| 2818 | open: Configuration.mainData.open, |
| 2819 | port: Configuration.mainData.port |
| 2820 | }; |
| 2821 | if (Configuration.mainData.host !== '') { |
| 2822 | documentationServerConfiguration.host = Configuration.mainData.host; |
| 2823 | } |
| 2824 | startDocumentationServer(documentationServerConfiguration); |
| 2825 | } |
| 2826 | if (Configuration.mainData.watch && !this.isWatching) { |
| 2827 | if (typeof this.files === 'undefined') { |
| 2828 | logger.error('No sources files available, please use -p flag'); |
| 2829 | generationPromiseReject(); |
| 2830 | process.exit(1); |
| 2831 | } else { |
| 2832 | this.runWatch(); |
| 2833 | } |
| 2834 | } else if (Configuration.mainData.watch && this.isWatching) { |
| 2835 | let srcFolder = findMainSourceFolder(this.files); |
| 2836 | logger.info(`Already watching sources in ${srcFolder} folder`); |
| 2837 | } |
| 2838 | } |
| 2839 | |
| 2840 | public runWatch() { |
| 2841 | let sources = [findMainSourceFolder(this.files)]; |
no test coverage detected