Skip to content

Commit 51e3e0e

Browse files
authored
Merging forks that were never merged into the official pug-cli (closes #4 from tokilabs/merging-forks)
Here's a list of the merged contributions: - @Anduh at [anduh/pug-cli](https://github.com/anduh/pug-cli) - Update Pug to version 3.0.2 (Closes pugjs#88) - @anthony-tron at [anthony-tron/pug-cli](https://github.com/anthony-tron/pug-cli) - Hot reload of options file and YAML in `-O | --obj` option (Closes pugjs#89) - @lazdmx at https://github.com/lazdmx/pug-cli - Allow symlink as input 2d6c334 (Closes pugjs#80) [2d6c334](lazdmx@2d6c334) - @funai at [funai/pug-cli](https://github.com/funai/pug-cli) - [Allow templates to use YAML front-matter](4d5b6e6) - [Inject `extends` from frontmatter `layout`](4d5b6e6#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R260)
2 parents 0eb8d37 + 931f446 commit 51e3e0e

File tree

9 files changed

+4037
-514
lines changed

9 files changed

+4037
-514
lines changed

Diff for: .gitignore

+49-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,56 @@
1-
*.seed
2-
*.log
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# cache files
4+
build/
5+
dist/
6+
logs/
7+
out/
8+
results/
9+
temp/
310
*.csv
411
*.dat
12+
*.gz
13+
*.log
514
*.out
615
*.pid
7-
*.gz
16+
*.seed
817
pids
9-
logs
10-
results
11-
npm-debug.log
12-
node_modules
13-
coverage
18+
19+
# testing
1420
cov-pt*
21+
coverage
1522
test/temp
23+
24+
# next.js
25+
.next/
26+
27+
# misc
28+
.DS_Store
29+
*.pem
30+
31+
# debug
32+
.pnpm-debug.log*
33+
npm-debug.log*
34+
yarn-debug.log*
35+
yarn-error.log*
36+
37+
# local env files
38+
.env.development.local
39+
.env.local
40+
.env.production.local
41+
.env.test.local
42+
43+
# dependencies
44+
node_modules
45+
package-lock.json
46+
.pnp
47+
.pnp.*
48+
49+
# Yarn
50+
yarn.lock
51+
.yarn/*
52+
!.yarn/patches
53+
!.yarn/plugins
54+
!.yarn/releases
55+
!.yarn/sdks
56+
!.yarn/versions

Diff for: .travis.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ language: node_js
22
sudo: false
33

44
node_js:
5-
- "0.10"
6-
- "0.12"
7-
- "4"
8-
- "6"
5+
- "10"
6+
- "12"
7+
- "14"
98

109
after_success:
1110
- npm run coverage

Diff for: HISTORY.md

+13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
As with most npm modules, this project adheres to
33
[Semantic Versioning](http://semver.org/).
44

5+
## [1.0.0] - 2021-06-13
6+
7+
### Changed
8+
- command is now `pug3`, to make it possible to have installed globally alongside pug-cli
9+
- update Readme
10+
- Removing broken test ("JavaScript syntax does not accept UTF newlines")
11+
- upgrade to PUG 3
12+
- upgrade all dependencies
13+
- configure Travis to test with Node 10, 12 and 14 (Pug 3 supports Node 10+)
14+
15+
### Added
16+
- `man` page
17+
518
## [1.0.0-alpha6] - 2016-06-01
619

720
### Added

Diff for: README.md

+26-17
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
# pug-cli
1+
# @anduh/pug-cli
22

3-
Pug's CLI interface
3+
PUG 3 CLI interface
44

5-
[![Build Status](https://img.shields.io/travis/pugjs/pug-cli/master.svg)](https://travis-ci.org/pugjs/pug-cli)
6-
[![Dependency Status](https://img.shields.io/david/pugjs/pug-cli.svg)](https://david-dm.org/pugjs/pug-cli)
7-
[![NPM version](https://img.shields.io/npm/v/pug-cli.svg)](https://www.npmjs.org/package/pug-cli)
8-
[![Coverage Status](https://img.shields.io/codecov/c/github/pugjs/pug-cli.svg)](https://codecov.io/gh/pugjs/pug-cli)
5+
[![Dependency Status](https://img.shields.io/david/anduh/pug-cli.svg)](https://david-dm.org/anduh/pug-cli)
6+
[![NPM version](https://img.shields.io/npm/v/@anduh/pug-cli.svg)](https://www.npmjs.org/package/@anduh/pug-cli)
7+
[![Coverage Status](https://img.shields.io/codecov/c/github/anduh/pug-cli.svg)](https://codecov.io/gh/anduh/pug-cli)
8+
9+
**@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.
912

1013
## Usage
1114

1215
```
13-
$ pug [options] [dir|file ...]
16+
$ pug3 [options] [dir|file ...]
1417
```
1518

1619
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.
2124
```
2225
-h, --help output usage information
2326
-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
2528
-o, --out <dir> output the rendered HTML or compiled JavaScript to
2629
<dir>
2730
-p, --path <path> filename used to resolve includes
@@ -44,49 +47,55 @@ input is taken from standard input and output to standard output.
4447
Render all files in the `templates` directory:
4548

4649
```
47-
$ pug templates
50+
$ pug3 templates
4851
```
4952

5053
Create `{foo,bar}.html`:
5154

5255
```
53-
$ pug {foo,bar}.pug
56+
$ pug3 {foo,bar}.pug
5457
```
5558

5659
Using `pug` over standard input and output streams:
5760

5861
```
59-
$ pug < my.pug > my.html
62+
$ pug3 < my.pug > my.html
6063
$ echo "h1 Pug!" | pug
6164
```
6265

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

6568
```
66-
$ pug foo bar --out /tmp
69+
$ pug3 foo bar --out /tmp
6770
```
6871

6972
Specify options through a string:
7073

7174
```
72-
$ pug -O '{"doctype": "html"}' foo.pug
75+
$ pug3 -O '{"doctype": "html"}' foo.pug
7376
# or, using JavaScript instead of JSON
74-
$ pug -O "{doctype: 'html'}" foo.pug
77+
$ pug3 -O "{doctype: 'html'}" foo.pug
7578
```
7679

7780
Specify options through a file:
7881

7982
```
8083
$ echo "exports.doctype = 'html';" > options.js
81-
$ pug -O options.js foo.pug
84+
$ pug3 -O options.js foo.pug
8285
# or, JSON works too
8386
$ echo '{"doctype": "html"}' > options.json
84-
$ pug -O options.json foo.pug
87+
$ pug3 -O options.json foo.pug
88+
# YAML works as well
89+
$ pug3 -O options.yaml foo.pug
8590
```
8691

8792
## Installation
8893

89-
npm install pug-cli -g
94+
npm install @anduh/pug-cli -g
95+
96+
## Original
97+
The original project this was forked from:
98+
* [github.com/pugjs/pug-cli](https://github.com/pugjs/pug-cli)
9099

91100
## License
92101

0 commit comments

Comments
 (0)