Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging forks that were never merged into the official pug-cli #93

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
04047dc
remove broken test
borisovg May 3, 2021
77190b2
upgrade packages
borisovg May 3, 2021
be4d10c
bump Node versions in Travis
borisovg May 3, 2021
f89b817
increase version & update changelog
Anduh Jun 13, 2021
3710e99
rename pkg to scoped
Anduh Jun 13, 2021
cbe67a1
change pkg-name, change cmd to pug3, add man page, update readme/pkg.…
Anduh Jun 13, 2021
9a0eb81
Merge pull request #1 from Anduh/personal-fork
Anduh Jun 13, 2021
8129b2c
man fix attempt
Anduh Jun 13, 2021
2f9dfb1
update readme
Anduh Jun 13, 2021
6f4eaa3
readme cleanup
Anduh Jun 13, 2021
4fa88a1
Merge pull request #1 from Anduh/master
svallory Apr 21, 2023
71a0972
✨ Support hot reload for object files (JS, JSON)
anthony-tron Aug 9, 2021
f51a945
✨ Support YAML
anthony-tron Aug 9, 2021
952d717
⏪️ Switch back to fs.watchFile because it's less buggy even though no…
anthony-tron Aug 9, 2021
f4ca49d
📝 Updated usage for YAML
anthony-tron Aug 9, 2021
403c263
⏮ Removed useless console.log
anthony-tron Aug 9, 2021
98d7c28
Merge pull request #2 from tokilabs/anthony-tron/yaml-support
svallory Apr 21, 2023
cf7c292
Require 'gray-matter'.
Sep 9, 2020
55e4f44
Allow templates to use YAML front-matter.
Sep 9, 2020
4e2542c
include directory should be specified with `--obj` option (json config).
Sep 23, 2020
115eeb1
fixed: injected `extends` added up with reloads.
Sep 23, 2020
3a081f5
support YAML for `--obj` option. (port from "anthony-tron/pug-cli")
funai Jul 19, 2022
c53438a
assign `page.data` directly to `options.page`. i.e. `page.data.foo` -…
funai Jul 19, 2022
2b1d0f4
Merge pull request #3 from tokilabs/funai/master
svallory Apr 21, 2023
ebc24ea
Fix bugs and tests
svallory Apr 23, 2023
931f446
Allow symlink as input (Closes #80)
lazdmx Feb 26, 2020
04ad621
Update package name and info
svallory Apr 23, 2023
4e9dd8e
Set package access to public
svallory Apr 23, 2023
1d3a7b6
Update package.json
svallory Jul 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 49 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,56 @@
*.seed
*.log
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# cache files
build/
dist/
logs/
out/
results/
temp/
*.csv
*.dat
*.gz
*.log
*.out
*.pid
*.gz
*.seed
pids
logs
results
npm-debug.log
node_modules
coverage

# testing
cov-pt*
coverage
test/temp

# next.js
.next/

# misc
.DS_Store
*.pem

# debug
.pnpm-debug.log*
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.development.local
.env.local
.env.production.local
.env.test.local

# dependencies
node_modules
package-lock.json
.pnp
.pnp.*

# Yarn
yarn.lock
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ language: node_js
sudo: false

node_js:
- "0.10"
- "0.12"
- "4"
- "6"
- "10"
- "12"
- "14"

after_success:
- npm run coverage
Expand Down
13 changes: 13 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
As with most npm modules, this project adheres to
[Semantic Versioning](http://semver.org/).

## [1.0.0] - 2021-06-13

### Changed
- command is now `pug3`, to make it possible to have installed globally alongside pug-cli
- update Readme
- Removing broken test ("JavaScript syntax does not accept UTF newlines")
- upgrade to PUG 3
- upgrade all dependencies
- configure Travis to test with Node 10, 12 and 14 (Pug 3 supports Node 10+)

### Added
- `man` page

## [1.0.0-alpha6] - 2016-06-01

### Added
Expand Down
55 changes: 38 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# pug-cli
# @tokilabs/pug3-cli

Pug's CLI interface
Pug 3 CLI with many fixes and improvements

[![Build Status](https://img.shields.io/travis/pugjs/pug-cli/master.svg)](https://travis-ci.org/pugjs/pug-cli)
[![Dependency Status](https://img.shields.io/david/pugjs/pug-cli.svg)](https://david-dm.org/pugjs/pug-cli)
[![NPM version](https://img.shields.io/npm/v/pug-cli.svg)](https://www.npmjs.org/package/pug-cli)
[![Coverage Status](https://img.shields.io/codecov/c/github/pugjs/pug-cli.svg)](https://codecov.io/gh/pugjs/pug-cli)
[![NPM version](https://img.shields.io/npm/v/@tokilabs/pug3-cli.svg)](https://www.npmjs.org/package/@tokilabs/pug3-cli)

**@tokilabs/pug-cli** is a CLI for running [Pug](https://pugjs.org/), updated to Pug 3.0.2. It's a fork of the original [pug-cli](https://www.npmjs.com/package/pug-cli), which still uses PUG 2.

## Usage

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

Render `<file>`s and all files in `<dir>`s. If no files are specified,
Expand All @@ -21,7 +20,7 @@ input is taken from standard input and output to standard output.
```
-h, --help output usage information
-V, --version output the version number
-O, --obj <str|path> JSON/JavaScript options object or file
-O, --obj <str|path> JSON/JavaScript/YAML options object or file
-o, --out <dir> output the rendered HTML or compiled JavaScript to
<dir>
-p, --path <path> filename used to resolve includes
Expand All @@ -44,49 +43,71 @@ input is taken from standard input and output to standard output.
Render all files in the `templates` directory:

```
$ pug templates
$ pug3 templates
```

Create `{foo,bar}.html`:

```
$ pug {foo,bar}.pug
$ pug3 {foo,bar}.pug
```

Using `pug` over standard input and output streams:

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

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

```
$ pug foo bar --out /tmp
$ pug3 foo bar --out /tmp
```

Specify options through a string:

```
$ pug -O '{"doctype": "html"}' foo.pug
$ pug3 -O '{"doctype": "html"}' foo.pug
# or, using JavaScript instead of JSON
$ pug -O "{doctype: 'html'}" foo.pug
$ pug3 -O "{doctype: 'html'}" foo.pug
```

Specify options through a file:

```
$ echo "exports.doctype = 'html';" > options.js
$ pug -O options.js foo.pug
$ pug3 -O options.js foo.pug
# or, JSON works too
$ echo '{"doctype": "html"}' > options.json
$ pug -O options.json foo.pug
$ pug3 -O options.json foo.pug
# YAML works as well
$ pug3 -O options.yaml foo.pug
```

## Installation

npm install pug-cli -g
### Global installation

npm install -g @tokilabs/pug-cli

Use --help to learn how to use it

pug3 --help

### Local installation

yarn add -D install @tokilabs/pug-cli

Run with yarn:

yarn pug3 ...

## Original

The original project this was forked from:

- [github.com/pugjs/pug-cli](https://github.com/pugjs/pug-cli)

## License

Expand Down
Loading