【问题标题】:compile coffescript and stylus in jade在jade中编译coffescript和stylus
【发布时间】:2016-09-15 09:34:47
【问题描述】:

我正在使用 gulp,我有一个问题:

有没有办法在带有 scriptstyle 标签的jade文件中编写coffescript和stylus,以将它们编译成三个不同的文件(html、css和js) ?

例如,我想写这样的东西:

h1.foo#bar hello, world!

style
  .foo
    color $stylusVariable

script
  $('#bar').click ->
    console.log $(this)

并获取 index.html 和 app.js 和 style.css(其中包含项目中的所有 js 和 css 代码)。你能帮我处理一些必要的插件和 gulp-task 吗?

【问题讨论】:

标签: javascript node.js coffeescript gulp stylus


【解决方案1】:

你应该检查你的机器上的翡翠版本并重新阅读翡翠文件。 Jade 支持现在在玉文件中编写器 js。

http://jade-lang.com/reference/filters/

【讨论】:

  • 谢谢你的回答,但是玉里面的手写笔呢?
猜你喜欢
  • 2023-04-09
  • 1970-01-01
  • 2013-08-10
  • 2012-09-16
  • 2014-11-05
  • 2012-11-08
  • 2012-06-15
  • 1970-01-01
  • 2015-04-03
相关资源
最近更新 更多