kunmomo

我们可以使用html2jade将html编译成jade

 

首先安装html2jade

npm install html2jade -g

 

用法一:使用html2jade将html转为jade

html2jade http://www.imooc.com > mock.jade

上面表示将慕课网的首页转化为jade,会在文件中生成mock.jade文件

 

用法二:使用html2jade转换时会自动添加html、body等

html2jade title.html > title.jade

html2jade跟上一个相对路径的文件

 

用法三:在node中使用,拿到反编译之后的文件

const html2jade = require(\'html2jade\');

html2jade.convertDocument(document,{},function(err,data){
        
      // data
});

 

视频地址:http://www.imooc.com/learn/259

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-10
  • 2021-10-05
  • 2022-01-16
  • 2022-12-23
  • 2021-12-16
  • 2022-02-27
猜你喜欢
  • 2021-11-21
  • 2022-01-05
  • 2022-03-08
  • 2022-02-09
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案