ipug

Crates.ioipug
lib.rsipug
version0.2.1
sourcesrc
created_at2024-05-20 14:46:52.069403
updated_at2024-05-26 02:17:54.914607
descriptionpug.js port to Rust
homepage
repositoryhttps://github.com/i18n-now/pug-rs
max_upload_size
id1245791
size25,468
(3tieto)

documentation

README

pug-rs

crates.io

A port of pug to Rust.

This is a maintained fork of the original code by github.com/aep.

CLI usage

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

Using with 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')]
      },

Commit count: 28

cargo fmt