File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ const babel = path.join(
12
12
)
13
13
const babelConfig = path . join ( __dirname , "babel.config.js" )
14
14
15
- const args = ( { filepath } ) => {
15
+ function JavaScriptArgs ( { filepath } ) {
16
16
const cmd = `'${ babel } ' --filename '${ filepath } ' --config-file ${ babelConfig } < '${ filepath } '| node`
17
17
return GrammarUtils . formatArgs ( cmd )
18
18
}
19
+
19
20
const Dart = {
20
21
"Selection Based" : {
21
22
command : "dart" ,
@@ -36,10 +37,10 @@ const JavaScript = {
36
37
args : ( context ) => {
37
38
const code = context . getCode ( )
38
39
const filepath = GrammarUtils . createTempFileWithCode ( code , ".js" )
39
- return args ( { filepath } )
40
+ return JavaScriptArgs ( { filepath } )
40
41
} ,
41
42
} ,
42
- "File Based" : { command : GrammarUtils . command , args } ,
43
+ "File Based" : { command : GrammarUtils . command , args : JavaScriptArgs } ,
43
44
}
44
45
const Babel = JavaScript
45
46
const JSX = JavaScript
You can’t perform that action at this time.
0 commit comments