2 个版本

0.2.1 2024 年 5 月 26 日
0.2.0 2024 年 5 月 20 日

#9#jade

Download history · Rust 包仓库 161/week @ 2024-05-19 · Rust 包仓库 182/week @ 2024-05-26 · Rust 包仓库 7/week @ 2024-06-02 · Rust 包仓库 33/week @ 2024-06-09 · Rust 包仓库 40/week @ 2024-06-16 · Rust 包仓库 58/week @ 2024-06-30 · Rust 包仓库 10/week @ 2024-07-07 · Rust 包仓库 62/week @ 2024-07-14 · Rust 包仓库 136/week @ 2024-08-04 · Rust 包仓库

198 每月下载次数
用于 2 个 crate(通过 i18n_js

MIT 许可证

18KB
461

pug-rs

crates.io

pug 的 Rust 版本。

这是由 github.com/aep 的 原始代码 维护的分支。

命令行使用

$ cargo install pug
$ pug < thing.pug > thing.html

与 webpack 一起使用

pug_loader.js

const spawnSync = require('child_process').spawnSync;
module.exports = function(source) {
  var proc = spawnSync("pug", {
    input: source
  });
  if (proc.status != 0) {
    throw proc.error;
  }
  return proc.stdout.toString();
}

webpack.config.js

  module: {
    rules: [
      {
        test: /\.pug$/,
        use: [require.resolve('./pug_loader.js')]
      },

依赖关系

~2.1–3MB
~59K SLoC