# html2pug-glob

> Just like html2pug, but supports file glob.

Latest version **0.0.3** (published 2025-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install html2pug-glob
pnpm add html2pug-glob
yarn add html2pug-glob
bun add html2pug-glob
```

Provides the command `html2pug-glob`.

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2025-12-08 |
| First published | 2022-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | Maiko Tan |
| Maintainers | maiko_tan |

## Links

- npm: https://www.npmjs.com/package/html2pug-glob
- Repository: https://github.com/MaikoTan/html2pug-glob
- Homepage: https://github.com/MaikoTan/html2pug-glob#readme
- Issues: https://github.com/MaikoTan/html2pug-glob/issues
- npm.io page: https://npm.io/package/html2pug-glob

## Dependencies (4)

- [yargs](https://npm.io/package/yargs.md) ^17.4.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.1
- [html2pug](https://npm.io/package/html2pug.md) ^4.0.0
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.2.11

## Recent versions

- 0.0.3 (latest) — 2025-12-08
- 0.0.2 — 2022-06-09
- 0.0.1 — 2022-04-07

## README

<p align="center">
  <h1 align="center">html2pug-glob</h1>
</p>

<p align="center">

[![NPM Version](https://img.shields.io/npm/v/html2pug-glob?style=flat)](https://www.npmjs.com/package/html2pug-glob)
[![NPM Downloads](https://img.shields.io/npm/dw/html2pug-glob)](https://www.npmjs.com/package/html2pug-glob)
[![Publish](https://github.com/MaikoTan/html2pug-glob/actions/workflows/publish.yml/badge.svg)](https://github.com/MaikoTan/html2pug-glob/actions/workflows/publish.yml)
[![GitHub issues](https://img.shields.io/github/issues/MaikoTan/html2pug-glob)](https://github.com/MaikoTan/html2pug-glob/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/MaikoTan/html2pug-glob)](https://github.com/MaikoTan/html2pug-glob/pulls)
[![GitHub License](https://img.shields.io/github/license/MaikoTan/html2pug-glob?color=green)](https://github.com/MaikoTan/html2pug-glob/blob/master/LICENSE)

</p>

Convert HTML to Pug, supports file glob.

## Install

```sh
$ yarn add html2pug-glob
# Or you can use npm to install it:
$ npm install html2pug-glob
```

## Usage

Just simply type:

```sh
# Convert one HTML file
$ html2pug-glob index.html
# Or use glob
$ html2pug-glob **/*.html
# With specified output file name
$ html2pug-glob index.html -o index.pug
# With specified output directory
$ html2pug-glob index.html -o ./out
# Convert multiple files with specified output directory
$ html2pug-glob **/*.html -o ./out
```

### Options

Type `html2pug-glob --help` to see more options.

```sh
$ html2pug-glob --help

html2pug-glob <file..>

Convert HTML file to Pug

Positionals:
  file  Files to convert                                                [string]

Options:
  -o, --output      Output file names, ignored when multiple files is given
                                                                        [string]
  -d, --output-dir  Output directory                                    [string]
  -h, --help        Show help                                          [boolean]
  -v, --version     Show version number                                [boolean]
```

You can also pass [`fast-glob`](https://www.npmjs.com/package/fast-glob#options-3) options via cli.

For example:

```sh
$ html2pug-glob --cwd ./src --dot **/*.html
```

## License

This project is under the [MIT License](./LISENCE).

---
_Source: https://npm.io/package/html2pug-glob · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
