From 7a5df9f3875cfdec89fe98f9e1e67ed5653aa0c2 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Thu, 3 May 2018 22:01:29 -0400 Subject: [PATCH] Use Barrels --- src/common/index.ts | 1 + src/completion/index.ts | 1 + src/extension.ts | 25 +++++++++++-------------- src/formatting/commands/index.ts | 2 ++ src/formatting/formatters/index.ts | 2 ++ src/formatting/index.ts | 3 +++ src/linting/index.ts | 1 + src/test/extension.test.ts | 5 ++--- src/tree-view/index.ts | 1 + src/xpath/commands/index.ts | 1 + src/xpath/index.ts | 1 + src/xquery-execution/commands/index.ts | 1 + src/xquery-execution/index.ts | 1 + 13 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 src/common/index.ts create mode 100644 src/completion/index.ts create mode 100644 src/formatting/commands/index.ts create mode 100644 src/formatting/formatters/index.ts create mode 100644 src/formatting/index.ts create mode 100644 src/linting/index.ts create mode 100644 src/tree-view/index.ts create mode 100644 src/xpath/commands/index.ts create mode 100644 src/xpath/index.ts create mode 100644 src/xquery-execution/commands/index.ts create mode 100644 src/xquery-execution/index.ts diff --git a/src/common/index.ts b/src/common/index.ts new file mode 100644 index 0000000..6a9e980 --- /dev/null +++ b/src/common/index.ts @@ -0,0 +1 @@ +export * from "./create-document-selector"; diff --git a/src/completion/index.ts b/src/completion/index.ts new file mode 100644 index 0000000..38a1ea0 --- /dev/null +++ b/src/completion/index.ts @@ -0,0 +1 @@ +export * from "./xquery-completion-item-provider"; diff --git a/src/extension.ts b/src/extension.ts index 5e4f3a7..265594f 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,19 +1,16 @@ -import { languages, window, workspace, commands } from "vscode"; import { - ExtensionContext, Memento, TextEditor, TextEditorSelectionChangeEvent, - TextEditorSelectionChangeKind, WorkspaceConfiguration -} from "vscode"; + commands, languages, window, workspace, ExtensionContext, Memento, + TextEditor, TextEditorSelectionChangeEvent, TextEditorSelectionChangeKind + } from "vscode"; -import { createDocumentSelector } from "./common/create-document-selector"; -import { XQueryCompletionItemProvider } from "./completion/xquery-completion-item-provider"; -import { formatAsXml } from "./formatting/commands/formatAsXml"; -import { minifyXml } from "./formatting/commands/minifyXml"; -import { XmlFormatterFactory } from "./formatting/xml-formatter"; -import { XmlFormattingEditProvider } from "./formatting/xml-formatting-edit-provider"; -import { XQueryLinter } from "./linting/xquery-linter"; -import { XmlTreeDataProvider } from "./tree-view/xml-tree-data-provider"; -import { evaluateXPath } from "./xpath/commands/evaluateXPath"; -import { executeXQuery } from "./xquery-execution/commands/executeXQuery"; +import { createDocumentSelector } from "./common"; +import { XQueryCompletionItemProvider } from "./completion"; +import { XmlFormatterFactory, XmlFormattingEditProvider } from "./formatting"; +import { formatAsXml, minifyXml } from "./formatting/commands"; +import { XQueryLinter } from "./linting"; +import { XmlTreeDataProvider } from "./tree-view"; +import { evaluateXPath } from "./xpath/commands"; +import { executeXQuery } from "./xquery-execution/commands"; import * as constants from "./constants"; diff --git a/src/formatting/commands/index.ts b/src/formatting/commands/index.ts new file mode 100644 index 0000000..3e12b40 --- /dev/null +++ b/src/formatting/commands/index.ts @@ -0,0 +1,2 @@ +export * from "./formatAsXml"; +export * from "./minifyXml"; diff --git a/src/formatting/formatters/index.ts b/src/formatting/formatters/index.ts new file mode 100644 index 0000000..2628d02 --- /dev/null +++ b/src/formatting/formatters/index.ts @@ -0,0 +1,2 @@ +export * from "./classic-xml-formatter"; +export * from "./v2-xml-formatter"; diff --git a/src/formatting/index.ts b/src/formatting/index.ts new file mode 100644 index 0000000..d5956c4 --- /dev/null +++ b/src/formatting/index.ts @@ -0,0 +1,3 @@ +export * from "./xml-formatter"; +export * from "./xml-formatting-edit-provider"; +export * from "./xml-formatting-options"; diff --git a/src/linting/index.ts b/src/linting/index.ts new file mode 100644 index 0000000..4ab4df0 --- /dev/null +++ b/src/linting/index.ts @@ -0,0 +1 @@ +export * from "./xquery-linter"; diff --git a/src/test/extension.test.ts b/src/test/extension.test.ts index 0b14435..ce6f035 100644 --- a/src/test/extension.test.ts +++ b/src/test/extension.test.ts @@ -3,9 +3,8 @@ import { FormattingOptions } from "vscode"; import { TestDataLoader } from "./test-utils/test-data-loader"; -import { XmlFormatter } from "../formatting/xml-formatter"; -import { XmlFormattingOptions } from "../formatting/xml-formatting-options"; -import { V2XmlFormatter } from "../formatting/formatters/v2-xml-formatter"; +import { XmlFormatter, XmlFormattingOptions } from "../formatting"; +import { V2XmlFormatter } from "../formatting/formatters"; describe("V2XmlFormatter", () => { diff --git a/src/tree-view/index.ts b/src/tree-view/index.ts new file mode 100644 index 0000000..72d21e4 --- /dev/null +++ b/src/tree-view/index.ts @@ -0,0 +1 @@ +export * from "./xml-tree-data-provider"; diff --git a/src/xpath/commands/index.ts b/src/xpath/commands/index.ts new file mode 100644 index 0000000..d25f558 --- /dev/null +++ b/src/xpath/commands/index.ts @@ -0,0 +1 @@ +export * from "./evaluateXPath"; diff --git a/src/xpath/index.ts b/src/xpath/index.ts new file mode 100644 index 0000000..81dfa2a --- /dev/null +++ b/src/xpath/index.ts @@ -0,0 +1 @@ +export * from "./xpath-evaluator"; diff --git a/src/xquery-execution/commands/index.ts b/src/xquery-execution/commands/index.ts new file mode 100644 index 0000000..d97f33e --- /dev/null +++ b/src/xquery-execution/commands/index.ts @@ -0,0 +1 @@ +export * from "./executeXQuery"; diff --git a/src/xquery-execution/index.ts b/src/xquery-execution/index.ts new file mode 100644 index 0000000..9633bbb --- /dev/null +++ b/src/xquery-execution/index.ts @@ -0,0 +1 @@ +export * from "./child-process";