almighty-tool 0.0.26 → 0.0.27
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/package.json +1 -1
- package/scripts/code.util.ts +4 -1
package/package.json
CHANGED
package/scripts/code.util.ts
CHANGED
|
@@ -68,7 +68,10 @@ const codeUtil = {
|
|
|
68
68
|
const template = fs.readFileSync(templatePath, 'utf-8');
|
|
69
69
|
|
|
70
70
|
// 使用变量渲染模板
|
|
71
|
-
const result = mustache
|
|
71
|
+
const result = mustache
|
|
72
|
+
.render(template, variables)
|
|
73
|
+
.replace(/{/g, '{')
|
|
74
|
+
.replace(/}/g, '}');
|
|
72
75
|
|
|
73
76
|
// 写入目标文件
|
|
74
77
|
fs.writeFileSync(targetPath, result, 'utf-8');
|