-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#! /usr/bin/env node | ||
export {}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { SnippetCompilationResult } from './src/SnippetCompiler'; | ||
export { SnippetCompilationResult } from './src/SnippetCompiler'; | ||
export declare function compileSnippets(markdownFileOrFiles?: string | string[]): Promise<SnippetCompilationResult[]>; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export declare class CodeBlockExtractor { | ||
static readonly TYPESCRIPT_CODE_PATTERN: RegExp; | ||
private constructor(); | ||
static extract(markdownFilePath: string): Promise<string[]>; | ||
private static readFile; | ||
private static extractCodeBlocksFromMarkdown; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export declare class CodeWrapper { | ||
private constructor(); | ||
static wrap(code: string): string; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { PackageDefinition } from './PackageInfo'; | ||
export declare class LocalImportSubstituter { | ||
private readonly packageName; | ||
private readonly pathToPackageMain; | ||
constructor(packageDefinition: PackageDefinition); | ||
substituteLocalPackageImports(code: string): string; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export interface PackageDefinition { | ||
readonly name: string; | ||
readonly main: string; | ||
} | ||
export declare class PackageInfo { | ||
private constructor(); | ||
static read(): Promise<PackageDefinition>; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as Bluebird from 'bluebird'; | ||
import { TSError } from 'ts-node/dist/index'; | ||
export interface SnippetCompilationResult { | ||
readonly file: string; | ||
readonly index: number; | ||
readonly snippet: string; | ||
readonly error?: TSError; | ||
} | ||
export declare class SnippetCompiler { | ||
private readonly workingDirectory; | ||
private readonly runner; | ||
constructor(workingDirectory: string); | ||
compileSnippets(documentationFiles: string[]): Bluebird<SnippetCompilationResult[]>; | ||
private cleanWorkingDirectory; | ||
private extractAllCodeBlocks; | ||
private extractFileCodeBlocks; | ||
private sanitiseCodeBlock; | ||
private testCodeCompilation; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.