Skip to content

i18nsite/pug-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

pug.js port to Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%