A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue/commit/a4ed58c076649a4536b40a9c98c974c77602c76b below:

expose generateCodeFrame method · vuejs/vue@a4ed58c · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+14

-0

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+14

-0

lines changed Original file line number Diff line number Diff line change

@@ -33,6 +33,12 @@ Note the returned function code uses `with` and thus cannot be used in strict mo

33 33 34 34

#### Options

35 35 36 +

- `outputSourceRange` *new in 2.6*

37 +

- Type: `boolean`

38 +

- Default: `false`

39 + 40 +

Set this to true will cause the `errors` returned in the compiled result become objects in the form of `{ msg, start, end }`. The `start` and `end` properties are numbers that mark the code range of the error source in the template. This can be passed on to the `compiler.generateCodeFrame` API to generate code frame for the error.

41 + 36 42

- `whitespace`

37 43

- Type: `string`

38 44

- Valid values: `'preserve' | 'condense'`

@@ -140,6 +146,12 @@ Same as `compiler.compileToFunction` but generates SSR-specific render function

140 146 141 147

Parse a SFC (single-file component, or `*.vue` file) into a descriptor (refer to the `SFCDescriptor` type in [flow declarations](https://github.com/vuejs/vue/blob/dev/flow/compiler.js)). This is used in SFC build tools like `vue-loader` and `vueify`.

142 148 149 +

---

150 + 151 +

### compiler.generateCodeFrame(template, start, end)

152 + 153 +

Generate a code frame that highlights the part in `template` defined by `start` and `end`. Useful for error reporting in higher-level tooling.

154 + 143 155

#### Options

144 156 145 157

#### `pad`

Original file line number Diff line number Diff line change

@@ -3,3 +3,4 @@

3 3

export { parseComponent } from 'sfc/parser'

4 4

export { compile, compileToFunctions } from './compiler/index'

5 5

export { ssrCompile, ssrCompileToFunctions } from './server/compiler'

6 +

export { generateCodeFrame } from 'compiler/codeframe'

Original file line number Diff line number Diff line change

@@ -1 +1,2 @@

1 1

export { compile } from 'weex/compiler/index'

2 +

export { generateCodeFrame } from 'compiler/codeframe'

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4