diff --git a/ets2panda/linter/build_linter.py b/ets2panda/linter/build_linter.py index bac519dd17763b0ac1b99f4a463311654c45d107..fc44485d8132b17f3205d1505c3e1188e302f9e7 100755 --- a/ets2panda/linter/build_linter.py +++ b/ets2panda/linter/build_linter.py @@ -36,6 +36,9 @@ def copy_files(source_path, dest_path, is_file=False): def run_cmd(cmd, execution_path=None): + if (cmd and cmd[0].strip().endswith('npm')): + cmd.append('--registry') + cmd.append('https://repo.huaweicloud.com/repository/npm/') proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE, @@ -103,9 +106,6 @@ def copy_output(options): copy_files(os.path.join(options.output_path, 'package'), options.output_path) run_cmd(['rm', '-rf', os.path.join(options.output_path, 'package')]) run_cmd(['rm', '-rf', dest]) - src = os.path.join(options.source_path, 'tsconfig.json') - dest = os.path.join(options.output_path, 'tsconfig.json') - copy_files(src, dest, True) def install_typescript(options): diff --git a/ets2panda/linter/package.json b/ets2panda/linter/package.json index cadf353451f5c52376a1b416e3394904aa019710..7b374c99446f72623c7be16bb317357464add5a4 100644 --- a/ets2panda/linter/package.json +++ b/ets2panda/linter/package.json @@ -16,9 +16,8 @@ "compile": "npm run tsc", "postcompile": "node scripts/testRunner/post-compile.mjs", "build": "npm run clean && npm run compile && npm run webpack && npm run pack:linter", - "preinstall": "npm install --production --prefix arkanalyzer && npm install --production --prefix homecheck", "install-ohos-typescript": "node scripts/install-ohos-typescript-and-homecheck.mjs", - "pack:linter": "rimraf bundle && mkdir bundle && npm pack --pack-destination bundle", + "pack:linter": "rimraf bundle && mkdir bundle && npm pack && mv panda-tslinter-*.tgz bundle", "pretest": " npm run fix", "test": "npm run test_all && npm run test_ts_import_ets", "test_all": "npm run testrunner -- -d test/main,test/rules,test/regression,test/extended_features,test/migration,test/ohmurl,test/interop,test/sdkwhite,test/concurrent,test/builtin",