Skip to content

Commit fd67b37

Browse files
Automated CI commit of compiled javascript
1 parent 0dde318 commit fd67b37

33 files changed

+629
-0
lines changed

dist/bin/compile-typescript-docs.d.ts

Whitespace-only changes.

dist/bin/compile-typescript-docs.js

Lines changed: 73 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bin/compile-typescript-docs.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/// <reference types="bluebird" />
2+
import * as Bluebird from 'bluebird';
3+
import { SnippetCompilationResult } from './src/SnippetCompiler';
4+
export declare function compileSnippets(markdownFileOrFiles?: string | string[]): Bluebird<SnippetCompilationResult[]>;

dist/index.js

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/CodeBlockExtractor.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/// <reference types="bluebird" />
2+
import * as Bluebird from 'bluebird';
3+
export declare class CodeBlockExtractor {
4+
static readonly TYPESCRIPT_CODE_PATTERN: RegExp;
5+
private constructor();
6+
static extract(markdownFilePath: string): Bluebird<string[]>;
7+
private static readFile(path);
8+
private static extractCodeBlocksFromMarkdown(markdown);
9+
}

dist/src/CodeBlockExtractor.js

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/CodeBlockExtractor.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/CodeWrapper.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export declare class CodeWrapper {
2+
private constructor();
3+
static wrap(code: string): string;
4+
}

dist/src/CodeWrapper.js

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/CodeWrapper.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/LocalImportSubstituter.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { PackageDefinition } from './PackageInfo';
2+
export declare class LocalImportSubstituter {
3+
private packageName;
4+
private pathToPackageMain;
5+
constructor(packageDefinition: PackageDefinition);
6+
substituteLocalPackageImports(code: string): string;
7+
}

dist/src/LocalImportSubstituter.js

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/LocalImportSubstituter.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/PackageInfo.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface PackageDefinition {
2+
readonly name: string;
3+
readonly main: string;
4+
}
5+
export declare class PackageInfo {
6+
private constructor();
7+
static read(): Promise<PackageDefinition>;
8+
}

dist/src/PackageInfo.js

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/PackageInfo.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/SnippetCompiler.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/// <reference types="bluebird" />
2+
import * as Bluebird from 'bluebird';
3+
import { TSError } from 'ts-node/dist/index';
4+
export interface SnippetCompilationResult {
5+
readonly file: string;
6+
readonly index: number;
7+
readonly snippet: string;
8+
readonly error?: TSError;
9+
}
10+
export declare class SnippetCompiler {
11+
private readonly workingDirectory;
12+
private readonly runner;
13+
constructor(workingDirectory: string);
14+
compileSnippets(documentationFiles: string[]): Bluebird<SnippetCompilationResult[]>;
15+
private cleanWorkingDirectory();
16+
private extractAllCodeBlocks(documentationFiles);
17+
private extractFileCodeBlocks(file, importSubstituter);
18+
private sanitiseCodeBlock(importSubstituter, block);
19+
private testCodeCompilation(example, index);
20+
}

dist/src/SnippetCompiler.js

Lines changed: 74 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)