td-octopus 0.1.18 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/main.js CHANGED
@@ -16,5 +16,5 @@ const argv = require('yargs')
16
16
  .alias('v', 'version')
17
17
  .help()
18
18
  .alias('h', 'help')
19
- .epilog(`copyright ${year} 同盾`)
20
- .argv;
19
+ .epilog(`copyright ${year} 同盾 npm i td-octopus -g`)
20
+ .argv;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "td-octopus",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "I18N tool",
5
5
  "author": "Anthony Li",
6
6
  "bin": {
@@ -3,7 +3,7 @@
3
3
  * @Author: 郑泳健
4
4
  * @Date: 2024-12-12 15:00:24
5
5
  * @LastEditors: 郑泳健
6
- * @LastEditTime: 2025-11-11 09:57:48
6
+ * @LastEditTime: 2025-11-19 15:38:18
7
7
  */
8
8
  const path = require('path');
9
9
  const fs = require('fs');
@@ -45,7 +45,7 @@ function readJsFiles(folderPath) {
45
45
  } else if (path.extname(fullPath) === '.js') {
46
46
  // 如果是 .js 文件,读取文件内容
47
47
  let content = fs.readFileSync(fullPath, 'utf-8');
48
- const ast = parse(source, { sourceType: 'module', plugins: ['jsx', 'typescript'] });
48
+ const ast = parse(content, { sourceType: 'module', plugins: ['jsx', 'typescript'] });
49
49
  const output = generate(ast, { comments: false });
50
50
  content = output.code;
51
51
  jsContent += `\n/* File: ${fullPath} */\n${content}\n`;