mps - fix prettier error #408

This commit is contained in:
dntzhang 2019-07-10 14:34:54 +08:00
parent db4426b760
commit b57251d45a
1 changed files with 4 additions and 3 deletions

View File

@ -78,10 +78,11 @@ function compile(file, watch) {
}).template.replace(/<block>/, '').replace(/([\s\S]*)<\/block>/, '$1')
console.log('[编译完成]'.green, file.path)
const res = prettier.format(template, { parser: "angular" })
console.log('[代码美化]'.green, name + '.wxml')
//注释掉以修复 import 的问题
//const res = prettier.format(template, { parser: "angular" })
//console.log('[代码美化]'.green, name + '.wxml')
fs.writeFileSync(dir + '/' + name + '.wxml', res)
fs.writeFileSync(dir + '/' + name + '.wxml', template)
console.log('[写入文件]'.green, name + '.wxml')
if (watch) {