
API Reference - Pug
This page details how to render Pug using the JavaScript API. Pug is available in your Web browser’s console! To test drive Pug’s API, as documented on this page, try entering: …
Getting Started - Pug
The general rendering process of Pug is simple. pug.compile() will compile the Pug source code into a JavaScript function that takes a data object (called “ locals ”) as an argument. Call that …
入门指南 | Pug 模板引擎中文文档 | Pug中文网
pug.compile() 会把 Pug 代码编译成一个 JavaScript 函数,并且这个函数有一个参数可用于传入数据(局部变量,locals)。 调用这个编译出来的函数,并且传入您的数据, 很好!
API 参考文档 | Pug 模板引擎中文文档 | Pug中文网
pug.filters . 这是一个存放自定义过滤器的哈希表。 这个对象和 filters 选项有着同样的语义,但它是全局地应用在所有 Pug 编译过程的。当一个过滤器名称同时出现在了 pug.filters 和 …
Pug -- 全新的 Vue 高效书写体验在年初 Vue3 刚成为 Vue 的默认版本时,在文档中看到了 Pug …
2022年12月13日 · 在 Vue3 里,响应式 API 有 ref 和 reactive 两大系列,通过这两个系列的 API 来定义具有响应性的变量。而在 Pug 中无法获取这两个系列的 API-- Pug 中不支持 JS 模块导 …
API 参考 – Pug 中文网 - Node.js
pug.compileFile(path, ?options)(pug.compileFile(path, ?options)) ¶. 将 Pug 模板从文件编译为函数,该函数可以使用不同的局部变量多次渲染。 ¥Compile a Pug template from a file to a …
API 参考 – Pug 中文文档
pug.filters(pug.filters) ¶ 自定义过滤器 的哈希表。 该对象具有与 filters 选项 相同的语义,但全局适用于所有 Pug 编译。
API 参考文档 - 《Pug.js模板引擎中文文档》 - 书栈网 · BookStack
2020年3月9日 · 把一个 Pug 模板编译成一份 JavaScript 代码字符串,它可以直接用在浏览器上而不需要 Pug 的运行时库。 您应该在需要 dependencies 来实现一些诸如“监视 Pug 文件变动” …
Pug API Reference 简体中文 - Runebook.dev
API Reference. 本页详细介绍了如何使用 JavaScript API 渲染 Pug 。 Options. 所有 API 方法都接受以下选项集: filename: string 正在编译的文件的名称。用于例外情况,并且对于相对的 …
API 参考文档 – Pug - pugjs.org
此页面将详细说明如何 JavaScript API 来对 Pug 代码进行渲染。 现在 Pug 可以在您的浏览器控制台上使用! 想测试各种 Pug 的 API,您可以尝试在控制台输入: pug.render('p Hello world!'); …