LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pug

Compile Pug templates to HTML

TLDR

Compile Pug to HTML
$ pug [file.pug]
copy
Compile to specific output
$ pug [file.pug] -o [output/]
copy
Watch for changes
$ pug -w [file.pug]
copy
Pretty output
$ pug -P [file.pug]
copy
Compile directory
$ pug [src/] -o [dist/]
copy

SYNOPSIS

pug [options] files...

DESCRIPTION

Pug (formerly Jade) is a template engine for Node.js. It compiles to HTML with a clean, whitespace-sensitive syntax that eliminates closing tags.

PARAMETERS

-o, --out dir

Output directory.
-P, --pretty
Pretty print output.
-w, --watch
Watch for changes.
-c, --client
Compile for client-side.
-O, --obj json
Locals object.
--name name
Template function name.

EXAMPLES

$ # Compile file
pug index.pug

# Pretty output
pug -P template.pug

# Watch directory
pug -w -P views/ -o public/

# With data
pug -O '{"title":"Hello"}' page.pug

# Client-side template
pug -c template.pug
copy

PUG SYNTAX

$ doctype html
html
  head
    title= pageTitle
  body
    h1 Hello World
    p.intro Welcome
    ul
      each item in items
        li= item
copy

INSTALL

brew install pug
copy

CAVEATS

Requires Node.js. Whitespace-sensitive (use consistent indentation). Was renamed from Jade due to trademark.

HISTORY

Pug was created by TJ Holowaychuk as Jade in 2010, renamed to Pug in 2016 due to trademark issues.

SEE ALSO

node(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid