From 19a13361d407bb8c1daf68a4589ab0fe0d3cdcd4 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Wed, 28 Feb 2024 15:51:16 +0800 Subject: [PATCH] fix(cli): cleanup js binding template (#1984) --- cli/src/api/templates/js-binding.ts | 6 ++---- examples/napi/index.cjs | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/cli/src/api/templates/js-binding.ts b/cli/src/api/templates/js-binding.ts index 4517df8a..aeb141c1 100644 --- a/cli/src/api/templates/js-binding.ts +++ b/cli/src/api/templates/js-binding.ts @@ -21,12 +21,10 @@ export function createCjsBinding( /* eslint-disable */ /* auto-generated by NAPI-RS */ -const { existsSync, readFileSync } = require('fs') -const { join } = require('path') +const { readFileSync } = require('fs') let nativeBinding = null -let localFileExisted = false -let loadErrors = [] +const loadErrors = [] const isMusl = () => { let musl = false diff --git a/examples/napi/index.cjs b/examples/napi/index.cjs index 15c078f9..403224b3 100644 --- a/examples/napi/index.cjs +++ b/examples/napi/index.cjs @@ -2,12 +2,10 @@ /* eslint-disable */ /* auto-generated by NAPI-RS */ -const { existsSync, readFileSync } = require('fs') -const { join } = require('path') +const { readFileSync } = require('fs') let nativeBinding = null -let localFileExisted = false -let loadErrors = [] +const loadErrors = [] const isMusl = () => { let musl = false