Jade 到 HTML 转换器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14426436/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 05:05:30  来源:igfitidea点击:

Jade to HTML converter

htmlconverterpug

提问by Clara

I have started writing an application using nodejs and jade, but after a while my team decided to switch to Django. I would still like to use the web pages written using jade, without having to re-write them by hand.

我已经开始使用 nodejs 和 jade 编写应用程序,但一段时间后我的团队决定切换到 Django。我还是想用用玉写的网页,不用手工重写。

Does anyone know of a tool that transforms jade code into html? As far as I've seen, most of the tools involving jade concentrate on the opposite transformation.

有谁知道将玉石代码转换成html的工具?据我所知,大部分涉及玉的工具都集中在相反的转换上。

采纳答案by Iftah

Jade is supposed to come with a command line utility that does exactly that.

Jade 应该带有一个命令行实用程序,可以做到这一点。

See here https://github.com/visionmedia/jade#jade1

看这里https://github.com/visionmedia/jade#jade1

Or see just above it for a make file that runs it.

或者在它上面查看运行它的 make 文件。

-

——

Edit - it seems Jade was renamed to Pug - see https://github.com/pugjs/pug/issues/2184

编辑 - 似乎 Jade 被重命名为 Pug - 见https://github.com/pugjs/pug/issues/2184

but the answer remains - Pug comes with a command line tool - install it with npm install pug-cli -g

但答案仍然存在 - Pug 带有一个命令行工具 - 安装它 npm install pug-cli -g

Then you can run pug my_template.pugwhich will produce my_template.html

然后你可以运行pug my_template.pug它会产生 my_template.html

回答by tldr

if you want something online. you can try http://naltatis.github.io/jade-syntax-docs/or http://jade-lang.com/demo/

如果你想要在线的东西。你可以试试http://naltatis.github.io/jade-syntax-docs/http://jade-lang.com/demo/