Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/server/js2html.js代码是否有误? #154

Open
364734461 opened this issue Sep 6, 2019 · 0 comments
Open

lib/server/js2html.js代码是否有误? #154

364734461 opened this issue Sep 6, 2019 · 0 comments

Comments

@364734461
Copy link

rc-tools/lib/server/js2html.js

line - 16 ~ 18
if (fs.existsSync(path.join(cwd, 'examples/template.xtpl'))) { tplName = path.join(cwd, 'examples/template.xtpl'); }
当我想要自定义模板时,翻阅源码发现提供了这么一个方法。然后我在自己项目添加examples/template.xtpl文件后,报错:找不到文件 examples/template.xtpl.xtpl 。可见render时默认添加的后缀.xtpl。故这段代码是否存在问题,我认为应该改为:
if (fs.existsSync(path.join(cwd, 'examples/template.xtpl'))) { tplName = path.join(cwd, 'examples/template'); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant