1.0.1 代码格式化移植新版

This commit is contained in:
睿 安
2025-09-17 11:28:54 +08:00
parent dc0cbe71dc
commit 6e550f1112
15 changed files with 818 additions and 344 deletions

34
copy-beautify-files.js Normal file
View File

@@ -0,0 +1,34 @@
const fs = require('fs-extra');
const path = require('path');
// 复制 js-beautify 相关文件到 dist 目录
async function copyBeautifyFiles() {
const srcDir = path.join(__dirname);
const destDir = path.join(__dirname, 'dist');
// 确保目标目录存在
await fs.ensureDir(destDir);
// 复制 js-beautify.js 和包装器
const filesToCopy = [
'js-beautify.js',
'js-beautify-wrapper.js'
];
for (const file of filesToCopy) {
const srcPath = path.join(srcDir, file);
const destPath = path.join(destDir, file);
if (await fs.pathExists(srcPath)) {
await fs.copy(srcPath, destPath);
console.log(`已复制 ${file} 到 dist 目录`);
}
}
}
// 如果直接运行此脚本,则执行复制操作
if (require.main === module) {
copyBeautifyFiles().catch(console.error);
}
module.exports = { copyBeautifyFiles };