Skip to content

9nix00/pug-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pug-cli

Pug's CLI interface

Build Status Dependency Status NPM version

Usage

$ pug [options] [dir|file ...]

Render <file>s and all files in <dir>s. If no files are specified, input is taken from standard input and output to standard output.

Options

-h, --help             output usage information
-V, --version          output the version number
-O, --obj <str|path>   JSON/JavaScript options object or file
-o, --out <dir>        output the rendered HTML or compiled JavaScript to
                       <dir>
-p, --path <path>      filename used to resolve includes
-P, --pretty           compile pretty HTML output
-c, --client           compile function for client-side runtime.js
-n, --name <str>       the name of the compiled template (requires --client)
-D, --no-debug         compile without debugging (smaller functions)
-w, --watch            watch files for changes and automatically re-render
-E, --extension <ext>  specify the output file extension
-s, --silent           do not output logs
--name-after-file      name the template after the last section of the file
                       path (requires --client and overriden by --name)
--doctype <str>        specify the doctype on the command line (useful if it
                       is not specified by the template)

Examples

Render all files in the templates directory:

$ pug templates

Create {foo,bar}.html:

$ pug {foo,bar}.pug

Using pug over standard input and output streams:

$ pug < my.pug > my.html
$ echo "h1 Pug!" | pug

Render all files in foo and bar directories to /tmp:

$ pug foo bar --out /tmp

Installation

npm install pug-cli -g

License

MIT

About

Jade's CLI interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%