From 54b200fe543d91569e2563ad8345390b8c117fd8 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 16 Sep 2019 16:31:54 -0400 Subject: [PATCH] wip: layout compiler files --- packages/compiler-core/__tests__/parse.spec.ts | 2 +- packages/compiler-core/src/codegen.ts | 0 packages/compiler-core/src/directives/vBind.ts | 0 packages/compiler-core/src/directives/vFor.ts | 0 packages/compiler-core/src/directives/vIf.ts | 0 packages/compiler-core/src/directives/vModel.ts | 0 packages/compiler-core/src/directives/vOn.ts | 0 packages/compiler-core/src/directives/vPre.ts | 0 packages/compiler-core/src/directives/vSlot.ts | 0 packages/compiler-core/src/directives/vText.ts | 0 .../compiler-core/src/{parserErrorTypes.ts => errorTypes.ts} | 0 packages/compiler-core/src/index.ts | 2 +- packages/compiler-core/src/optimizations/blocks.ts | 0 packages/compiler-core/src/optimizations/class.ts | 0 packages/compiler-core/src/optimizations/patchFlag.ts | 0 packages/compiler-core/src/optimizations/style.ts | 0 packages/compiler-core/src/parser.ts | 2 +- packages/compiler-core/src/parserOptionsMinimal.ts | 2 +- packages/compiler-core/src/transform.ts | 0 packages/compiler-dom/src/directives/vCloak.ts | 0 packages/compiler-dom/src/directives/vHtml.ts | 0 packages/compiler-dom/src/directives/vModel.ts | 0 packages/compiler-dom/src/directives/vOn.ts | 0 packages/compiler-dom/src/directives/vShow.ts | 0 24 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 packages/compiler-core/src/codegen.ts create mode 100644 packages/compiler-core/src/directives/vBind.ts create mode 100644 packages/compiler-core/src/directives/vFor.ts create mode 100644 packages/compiler-core/src/directives/vIf.ts create mode 100644 packages/compiler-core/src/directives/vModel.ts create mode 100644 packages/compiler-core/src/directives/vOn.ts create mode 100644 packages/compiler-core/src/directives/vPre.ts create mode 100644 packages/compiler-core/src/directives/vSlot.ts create mode 100644 packages/compiler-core/src/directives/vText.ts rename packages/compiler-core/src/{parserErrorTypes.ts => errorTypes.ts} (100%) create mode 100644 packages/compiler-core/src/optimizations/blocks.ts create mode 100644 packages/compiler-core/src/optimizations/class.ts create mode 100644 packages/compiler-core/src/optimizations/patchFlag.ts create mode 100644 packages/compiler-core/src/optimizations/style.ts create mode 100644 packages/compiler-core/src/transform.ts create mode 100644 packages/compiler-dom/src/directives/vCloak.ts create mode 100644 packages/compiler-dom/src/directives/vHtml.ts create mode 100644 packages/compiler-dom/src/directives/vModel.ts create mode 100644 packages/compiler-dom/src/directives/vOn.ts create mode 100644 packages/compiler-dom/src/directives/vShow.ts diff --git a/packages/compiler-core/__tests__/parse.spec.ts b/packages/compiler-core/__tests__/parse.spec.ts index 2cbe7187..8879c454 100644 --- a/packages/compiler-core/__tests__/parse.spec.ts +++ b/packages/compiler-core/__tests__/parse.spec.ts @@ -11,7 +11,7 @@ import { Position, TextNode } from '../src/ast' -import { ParserErrorTypes } from '../src/parserErrorTypes' +import { ParserErrorTypes } from '../src/errorTypes' import { parserOptionsMinimal as parserOptions } from '../src/parserOptionsMinimal' describe('parser/parse', () => { diff --git a/packages/compiler-core/src/codegen.ts b/packages/compiler-core/src/codegen.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/directives/vBind.ts b/packages/compiler-core/src/directives/vBind.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/directives/vFor.ts b/packages/compiler-core/src/directives/vFor.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/directives/vIf.ts b/packages/compiler-core/src/directives/vIf.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/directives/vModel.ts b/packages/compiler-core/src/directives/vModel.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/directives/vOn.ts b/packages/compiler-core/src/directives/vOn.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/directives/vPre.ts b/packages/compiler-core/src/directives/vPre.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/directives/vSlot.ts b/packages/compiler-core/src/directives/vSlot.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/directives/vText.ts b/packages/compiler-core/src/directives/vText.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/parserErrorTypes.ts b/packages/compiler-core/src/errorTypes.ts similarity index 100% rename from packages/compiler-core/src/parserErrorTypes.ts rename to packages/compiler-core/src/errorTypes.ts diff --git a/packages/compiler-core/src/index.ts b/packages/compiler-core/src/index.ts index 7dcb2fff..2e25f608 100644 --- a/packages/compiler-core/src/index.ts +++ b/packages/compiler-core/src/index.ts @@ -1,3 +1,3 @@ export { parse } from './parser' export * from './ast' -export * from './parserErrorTypes' +export * from './errorTypes' diff --git a/packages/compiler-core/src/optimizations/blocks.ts b/packages/compiler-core/src/optimizations/blocks.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/optimizations/class.ts b/packages/compiler-core/src/optimizations/class.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/optimizations/patchFlag.ts b/packages/compiler-core/src/optimizations/patchFlag.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/optimizations/style.ts b/packages/compiler-core/src/optimizations/style.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-core/src/parser.ts b/packages/compiler-core/src/parser.ts index d9adf171..90587389 100644 --- a/packages/compiler-core/src/parser.ts +++ b/packages/compiler-core/src/parser.ts @@ -1,4 +1,4 @@ -import { ParserErrorTypes } from './parserErrorTypes' +import { ParserErrorTypes } from './errorTypes' import { Node, AttributeNode, diff --git a/packages/compiler-core/src/parserOptionsMinimal.ts b/packages/compiler-core/src/parserOptionsMinimal.ts index 5b780ea1..4ed76bc5 100644 --- a/packages/compiler-core/src/parserOptionsMinimal.ts +++ b/packages/compiler-core/src/parserOptionsMinimal.ts @@ -1,6 +1,6 @@ import { TextModes, ParserOptions } from './parser' import { ElementNode, Namespaces, Position, Node } from './ast' -import { ParserErrorTypes, errorMessages } from './parserErrorTypes' +import { ParserErrorTypes, errorMessages } from './errorTypes' export const parserOptionsMinimal: ParserOptions = { delimiters: [`{{`, `}}`], diff --git a/packages/compiler-core/src/transform.ts b/packages/compiler-core/src/transform.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-dom/src/directives/vCloak.ts b/packages/compiler-dom/src/directives/vCloak.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-dom/src/directives/vHtml.ts b/packages/compiler-dom/src/directives/vHtml.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-dom/src/directives/vModel.ts b/packages/compiler-dom/src/directives/vModel.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-dom/src/directives/vOn.ts b/packages/compiler-dom/src/directives/vOn.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/compiler-dom/src/directives/vShow.ts b/packages/compiler-dom/src/directives/vShow.ts new file mode 100644 index 00000000..e69de29b