From e0f4c5e77d4eebc7403fb837c3a6f9e1038dd473 Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Mon, 24 Feb 2020 16:25:54 +0800 Subject: [PATCH] feat: add nukkit support Signed-off-by: MiaoWoo --- packages/nashorn/build.sh | 4 ++-- packages/nashorn/src/build.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nashorn/build.sh b/packages/nashorn/build.sh index 5bfc88b8..a4028ea8 100755 --- a/packages/nashorn/build.sh +++ b/packages/nashorn/build.sh @@ -1,5 +1,5 @@ -# sponge bukkit jdk bungee -TYPE=bungee +# sponge bukkit jdk bungee nukkit +TYPE=nukkit TARGET=../types/dist/typings npx tsc src/build.ts --outDir dist cd dist diff --git a/packages/nashorn/src/build.ts b/packages/nashorn/src/build.ts index 46ea2ec6..adf48f5b 100644 --- a/packages/nashorn/src/build.ts +++ b/packages/nashorn/src/build.ts @@ -178,7 +178,7 @@ typeMap['Matrix4d'] = 'any /*Matrix4d*/' function mappingType(type: string): string { let outType = typeMap[type] || type || 'any'; if (outType.indexOf('.') != -1) { - if (outType.startsWith('java.') || outType.startsWith('org.') || outType.startsWith('net.')) { + if (outType.startsWith('java.') || outType.startsWith('org.') || outType.startsWith('net.') || outType.startsWith('cn.')) { } else { outType = `any /*${outType}*/`