Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
启动 Express 服务器时,node app.js我看到显示以下消息:
node app.js
隐式 textOnly for scriptandstyle已被弃用。使用script.或style.代替。
script
style
script.
style.
此消息是什么意思,我该如何解决?
这个问题和这个拉取请求详细讨论了这个消息。基本上,您很快将不得不明确告诉 Jade,脚本只是文本。目前的方法:
script var a = 2;
已弃用。它将被替换为:
script. var a = 2;
script因此,要修复此消息,您需要通过在or之后添加一个点来明确显示该块是文本style
正如这里所说,这是为了让 Jade 更容易学习并允许在块中使用 Jade 代码块。
正如我上面提到的,这也适用于隐式style。