简体   繁体   English

在玉器中编译咖啡笔和手写笔

[英]compile coffescript and stylus in jade

i'm using gulp and i have a question: 我正在用口水,我有一个问题:

is there any way to write coffescript and stylus inside the jade-files with script and style tags to compile them to three difference files (html, css and js)? 有没有办法用脚本样式标签在玉文件中编写咖啡和手写笔,以将它们编译为三个差异文件(html,css和js)?

for example, i want to write something like this: 例如,我想写这样的东西:

h1.foo#bar hello, world!

style
  .foo
    color $stylusVariable

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

and get index.html and app.js and style.css (which contain all the js and css code from the project). 并获取index.html和app.js和style.css(其中包含项目中的所有js和css代码)。 can u help me with needful plugins and gulp-task? 您可以通过必要的插件和任务来帮助我吗?

You should checking jade version on your machine and reread jade document. 您应该在机器上检查Jade版本并重新读取Jade文档。 Jade support to writer js in jade files now. 现在,Jade对Jade文件中的writer JS的支持。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM