pugjs

    0热度

    1回答

    我使用gulp与gulp-pug,这样我可以在我的模板分割成可重用的组件。帕格抓住任何现有的* .pug(翡翠)文件,并将其转换为浏览器同步和/或项目构建(在我的情况下)的通用html文件。 gulp.task('views', function buildHTML() { return gulp.src('src/views/*.pug') .pipe(changed('src',

    1热度

    1回答

    据我所知,帕格不支持动态包括或扩展模板。即 extend path/to/template 的作品,但不 extend #{dynamic_path_to_template} 有一种解决方法(但令人费解的),将允许修改 语境在运行时使用的视图模板相同的目标:我的用例是我正在开发一个npm模块,并且用于扩展其他视图的模板位于模块内部。在模块发布和安装之后,路径将被定义(即node_modul

    1热度

    1回答

    我想在电子上使用帕格。 我有一个问题,我的第二个.pug文件无法正确显示,它只是输出帕格代码本身。 首先我有一个由main.js doctype html(lang='en') head meta(charset='utf-8') title HIMS body div(id="app") script. require('

    1热度

    1回答

    我为我的项目使用pugjs。我无法在pug模板中加载css文件。我使用下面的代码 index.pug link(rel="stylesheet", href="views/styles/products.css", type="text/css") This is my project structure

    4热度

    2回答

    这里是我的index.js文件: const express = require('express') const app = express() app.set('views', __dirname + '/views'); app.set('view engine', 'pug') app.get('/', function (req, res) { res.render

    0热度

    2回答

    当我尝试编译此: doctype html html(lang="en") head meta(http-equiv = "Content-Type " content ="text/html ;charset=utf-8") title = category.name body h1 Сьпiс таварау h2 Катэгоры

    0热度

    1回答

    谁能告诉我为什么哈巴狗API不具有简单的例子,从他们的文档页面 const pug = require('pug'); // Compile the source code const compiledFunction = pug.compileFile('template.pug'); // Render a set of data console.log(compiledFunct

    4热度

    2回答

    Hello guys我正在尝试在pug html属性中注入一个值。我似乎无法找到有关如何执行此操作的任何文档。这里是我的代码 input(type='hidden', name='country', value='#{val.snippet.id.videoId}') ,你可以想像val.snippet.id.videoId只是一个javascript变量我从我的服务器端传递。所以我想将val

    1热度

    2回答

    以下: span.M 很好地产生到: <span class='M'> 然而, span.glyphicon glyphicon-book 不起作用。 这是一种保存打字和转换类名的方法吗?

    0热度

    1回答

    不管,如果我用一口哈巴狗或只是哈巴狗,我得到这个错误:即使它看起来 SyntaxError: Unexpected token (12:15) at Parser.pp$4.raise (C:\Users\freet\AppData\Roaming\npm\node_modules\pug\node_modules\acorn-globals\node_modules\acorn\dis