diff --git a/src/harness/tsconfig.json b/src/harness/tsconfig.json index 37c24527730..5299b72bd27 100644 --- a/src/harness/tsconfig.json +++ b/src/harness/tsconfig.json @@ -15,15 +15,12 @@ { "path": "../services" }, { "path": "../jsTyping" }, { "path": "../server" }, - { "path": "../typingsInstallerCore" } + { "path": "../typingsInstallerCore" }, + { "path": "../vfs" } ], "files": [ - "collectionsImpl.ts", "util.ts", - "documentsUtil.ts", - "vpathUtil.ts", - "vfsUtil.ts", "compilerImpl.ts", "evaluatorImpl.ts", "fakesHosts.ts", diff --git a/src/harness/collectionsImpl.ts b/src/vfs/collectionsImpl.ts similarity index 100% rename from src/harness/collectionsImpl.ts rename to src/vfs/collectionsImpl.ts diff --git a/src/harness/documentsUtil.ts b/src/vfs/documentsUtil.ts similarity index 94% rename from src/harness/documentsUtil.ts rename to src/vfs/documentsUtil.ts index c07142e794f..1a05a3ac36e 100644 --- a/src/harness/documentsUtil.ts +++ b/src/vfs/documentsUtil.ts @@ -2,13 +2,19 @@ // support the eventual conversion of harness into a modular system. namespace documents { + export interface HarnessCompilerTestFile { + unitName: string; + content: string; + fileOptions?: any; + } + export class TextDocument { public readonly meta: Map; public readonly file: string; public readonly text: string; private _lineStarts: readonly number[] | undefined; - private _testFile: Harness.Compiler.TestFile | undefined; + private _testFile: HarnessCompilerTestFile | undefined; constructor(file: string, text: string, meta?: Map) { this.file = file; @@ -20,7 +26,7 @@ namespace documents { return this._lineStarts || (this._lineStarts = ts.computeLineStarts(this.text)); } - public static fromTestFile(file: Harness.Compiler.TestFile) { + public static fromTestFile(file: HarnessCompilerTestFile) { return new TextDocument( file.unitName, file.content, @@ -184,4 +190,4 @@ namespace documents { return vlq; } } -} \ No newline at end of file +} diff --git a/src/vfs/tsconfig.json b/src/vfs/tsconfig.json new file mode 100644 index 00000000000..24012adea5b --- /dev/null +++ b/src/vfs/tsconfig.json @@ -0,0 +1,25 @@ +{ + "extends": "../tsconfig-base", + "compilerOptions": { + "outFile": "../../built/local/vfs.js", + "types": [ + "node", "mocha", "chai" + ], + "lib": [ + "es6", + "scripthost" + ] + }, + "references": [ + { "path": "../compiler" }, + { "path": "../jsTyping" }, + { "path": "../services" } + ], + + "files": [ + "collectionsImpl.ts", + "documentsUtil.ts", + "vpathUtil.ts", + "vfsUtil.ts" + ] +} diff --git a/src/harness/vfsUtil.ts b/src/vfs/vfsUtil.ts similarity index 100% rename from src/harness/vfsUtil.ts rename to src/vfs/vfsUtil.ts diff --git a/src/harness/vpathUtil.ts b/src/vfs/vpathUtil.ts similarity index 100% rename from src/harness/vpathUtil.ts rename to src/vfs/vpathUtil.ts