mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Refactor: Convert copy_files.cjs to ES module syntax
- Converted scripts/copy_files.cjs to use ES module syntax (renaming to copy_files.js). - This change aligns with the project's preference for ES modules over CommonJS for better modernity and future-proofing. - Updated eslint.config.js to remove the .cjs override. - Adjusted scripts/build_package.sh to call the new .js file.
This commit is contained in:
committed by
N. Taylor Mullen
parent
3d74a7061e
commit
8b8fa6c1ae
@@ -27,7 +27,7 @@ fi
|
||||
tsc --build
|
||||
|
||||
# copy .{md,json} files
|
||||
node ../../scripts/copy_files.cjs
|
||||
node ../../scripts/copy_files.js
|
||||
|
||||
# touch dist/.last_build
|
||||
touch dist/.last_build
|
||||
|
||||
11
scripts/copy_files.cjs → scripts/copy_files.js
Executable file → Normal file
11
scripts/copy_files.cjs → scripts/copy_files.js
Executable file → Normal file
@@ -1,4 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// Copyright 2025 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -13,8 +20,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
const sourceDir = path.join('src');
|
||||
const targetDir = path.join('dist', 'src');
|
||||
Reference in New Issue
Block a user