You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**@anduh/pug-cli** is a CLI for rendering [PUG](https://pugjs.org/), updated to PUG 3. It's a fork of the original [pug-cli](https://www.npmjs.com/package/pug-cli), which still uses PUG 2.
10
+
11
+
**warning:** this is my first try at publishing an npm package, so this might not work.
9
12
10
13
## Usage
11
14
12
15
```
13
-
$ pug [options] [dir|file ...]
16
+
$ pug3 [options] [dir|file ...]
14
17
```
15
18
16
19
Render `<file>`s and all files in `<dir>`s. If no files are specified,
@@ -21,7 +24,7 @@ input is taken from standard input and output to standard output.
21
24
```
22
25
-h, --help output usage information
23
26
-V, --version output the version number
24
-
-O, --obj <str|path> JSON/JavaScript options object or file
27
+
-O, --obj <str|path> JSON/JavaScript/YAML options object or file
25
28
-o, --out <dir> output the rendered HTML or compiled JavaScript to
26
29
<dir>
27
30
-p, --path <path> filename used to resolve includes
@@ -44,49 +47,55 @@ input is taken from standard input and output to standard output.
44
47
Render all files in the `templates` directory:
45
48
46
49
```
47
-
$ pug templates
50
+
$ pug3 templates
48
51
```
49
52
50
53
Create `{foo,bar}.html`:
51
54
52
55
```
53
-
$ pug {foo,bar}.pug
56
+
$ pug3 {foo,bar}.pug
54
57
```
55
58
56
59
Using `pug` over standard input and output streams:
57
60
58
61
```
59
-
$ pug < my.pug > my.html
62
+
$ pug3 < my.pug > my.html
60
63
$ echo "h1 Pug!" | pug
61
64
```
62
65
63
66
Render all files in `foo` and `bar` directories to `/tmp`:
0 commit comments