Linux command
pug 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Compile Pug to HTML
pug [file.pug]
Compile to specific output
pug [file.pug] -o [output/]
Watch for changes
pug -w [file.pug]
Pretty output
pug -P [file.pug]
Compile directory
pug [src/] -o [dist/]
说明
Pug (formerly Jade) is a template engine for Node.js. It compiles to HTML with a clean, whitespace-sensitive syntax that eliminates closing tags.
参数
- -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.
FAQ
What is the pug command used for?
Pug (formerly Jade) is a template engine for Node.js. It compiles to HTML with a clean, whitespace-sensitive syntax that eliminates closing tags.
How do I run a basic pug example?
Run `pug [file.pug]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o, --out _dir_ do in pug?
Output directory.