File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
packages/babel-plugin-jsx Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,19 @@ import sugarFragment from './sugar-fragment';
10
10
export type State = {
11
11
get : ( name : string ) => any ;
12
12
set : ( name : string , value : any ) => any ;
13
- opts : Opts ;
13
+ opts : VueJSXPluginOptions ;
14
14
}
15
15
16
- export interface Opts {
16
+ export interface VueJSXPluginOptions {
17
+ /** transform `on: { click: xx }` to `onClick: xxx` */
17
18
transformOn ?: boolean ;
19
+ /** enable optimization or not. */
18
20
optimize ?: boolean ;
21
+ /** merge static and dynamic class / style attributes / onXXX handlers */
19
22
mergeProps ?: boolean ;
23
+ /** configuring custom elements */
20
24
isCustomElement ?: ( tag : string ) => boolean ;
25
+ /** enable object slots syntax */
21
26
enableObjectSlots ?: boolean ;
22
27
}
23
28
Original file line number Diff line number Diff line change 1
1
import { transform } from '@babel/core' ;
2
- import JSX , { Opts } from '../src' ;
2
+ import JSX , { VueJSXPluginOptions } from '../src' ;
3
3
4
4
interface Test {
5
5
name : string ;
6
6
from : string ;
7
7
}
8
8
9
9
const transpile = (
10
- source : string , options : Opts = { } ,
10
+ source : string , options : VueJSXPluginOptions = { } ,
11
11
) => new Promise ( ( resolve , reject ) => transform (
12
12
source ,
13
13
{
Original file line number Diff line number Diff line change 4
4
"rootDirs" : [" ./src" ],
5
5
"outDir" : " dist" ,
6
6
"downlevelIteration" : true ,
7
- "types" : [" node" , " jest" ]
7
+ "types" : [" node" , " jest" ],
8
+ "declaration" : true
8
9
},
9
- "include" : [
10
- " src/**/*" ,
11
- " global.d.ts"
12
- ],
10
+ "include" : [" src/**/*" , " global.d.ts" ],
13
11
"exclude" : [" node_modules" ]
14
12
}
You can’t perform that action at this time.
0 commit comments