尝试在我的新项目中使用早午餐。我想做的一件事是能够在 jade 中编写所有 HTML 资源,并在构建过程中将其渲染为 HTML。我找到了厌倦的早午餐,但我似乎不知道如何让它做我想做的事。这是我的配置。
exports.config = paths: watched: ['client'] npm: enabled: true packages: ['react'] plugins: jaded: jade: pretty: yes files: javascripts: joinTo: 'js/app.js': /^app/ 'js/vendor.js': /^(?!app)/ stylesheets: joinTo: 'css/app.css' templates: joinTo: 'index.html'
最佳答案
根据 jaded-brunch documentation ,您可以通过使用 .static.jade
文件扩展名命名所有 jade 文件,或者设置 staticPatterns
选项,将其编译为静态 html 输出,例如:
plugins:
jaded:
staticPatterns: /\.jade$/
jade:
pretty: yes
关于javascript - 如何使用 brunch 将 jade 模板渲染为 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34232007/