File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { main } from './lib/main.js'
2
2
3
- let ocPath = 'test/objc/NetworkRequest.h'
4
- let javaPath = 'test/java/helloworld.java'
3
+ let path = 'test/objc/NetworkRequest.h'
4
+ // let path = 'test/java/helloworld.java'
5
5
let option = {
6
6
output : 'test/dart' ,
7
7
// template: 'plugin',
8
8
// projectName: 'testPlugin'
9
9
}
10
10
11
- // run objc
12
- main ( ocPath , option , true )
13
- // run java
14
- main ( javaPath , option , false )
11
+ // run
12
+ main ( path , option , true )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { Worker } from 'worker_threads'
6
6
import DNObjectiveCConverter from './objc/DNObjectiveCConverter.js'
7
7
import DNJavaConverter from './java/DNJavaConverter.js'
8
8
9
- let dnPartExtension = 'dnpart'
9
+ const dnPartExtension = 'dnpart'
10
10
var outputDir
11
11
var projectName
12
12
var packageSet = new Set ( )
@@ -68,7 +68,7 @@ function writeOutputToFileByPath(result, srcPath) {
68
68
var srcFile = srcPath . substr ( srcPath . lastIndexOf ( '/' ) + 1 )
69
69
var components
70
70
if ( srcFile . endsWith ( dnPartExtension ) ) {
71
- partExtension = srcFile . split ( '.' ) . slice ( - 2 ) . join ( '.' )
71
+ const partExtension = srcFile . split ( '.' ) . slice ( - 2 ) . join ( '.' )
72
72
components = srcFile . split ( '.' ) . slice ( 0 , - 3 )
73
73
components . push ( 'dart' )
74
74
components . push ( partExtension )
@@ -201,7 +201,7 @@ async function runWorkItems(workItems) {
201
201
} )
202
202
return Promise . all ( ps ) . then ( ( results ) => {
203
203
// merge files
204
- mergeFiles ( results )
204
+ mergeFiles ( results . filter ( ( f ) => f != undefined ) )
205
205
} )
206
206
} )
207
207
await Promise . all ( promises )
You can’t perform that action at this time.
0 commit comments