# @masatomakino/gulptask-demo-page

> demo html generator for gulp.js

Latest version **0.10.5** (published 2026-01-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @masatomakino/gulptask-demo-page
pnpm add @masatomakino/gulptask-demo-page
yarn add @masatomakino/gulptask-demo-page
bun add @masatomakino/gulptask-demo-page
```

Provides the command `gulptask-demo-page`.

## Health

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

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.10.5 |
| Published | 2026-01-31 |
| First published | 2022-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 58.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | MasatoMakino |
| Maintainers | makio_masato |

## Links

- npm: https://www.npmjs.com/package/@masatomakino/gulptask-demo-page
- Repository: https://MasatoMakino@github.com/MasatoMakino/gulptask-demo-page
- Homepage: https://github.com/MasatoMakino/gulptask-demo-page#readme
- Issues: https://github.com/MasatoMakino/gulptask-demo-page/issues
- npm.io page: https://npm.io/package/@masatomakino/gulptask-demo-page

## Dependencies (7)

- [ejs](https://npm.io/package/ejs.md) ^3.1.9
- [glob](https://npm.io/package/glob.md) 13.0.0
- [webpack](https://npm.io/package/webpack.md) ^5.102.0
- [chokidar](https://npm.io/package/chokidar.md) ^5.0.0
- [commander](https://npm.io/package/commander.md) ^14.0.0
- [ts-loader](https://npm.io/package/ts-loader.md) ^9.4.2
- [typescript](https://npm.io/package/typescript.md) ^5.1.3

## Recent versions

- 0.10.5 (latest) — 2026-01-31
- 0.10.4 — 2026-01-25
- 0.10.3 — 2026-01-25
- 0.10.2 — 2025-12-19
- 0.10.1 — 2025-06-27
- 0.10.0 — 2025-06-02
- 0.9.0 — 2025-05-10
- 0.8.6 — 2025-05-10
- 0.8.5 — 2024-10-13
- 0.8.4 — 2024-09-09
- 0.8.3 — 2024-06-13
- 0.8.2 — 2024-02-14
- 0.8.1 — 2024-02-05
- 0.8.0 — 2023-12-14
- 0.7.4 — 2023-10-08
- … 20 more at https://npm.io/package/@masatomakino/gulptask-demo-page/versions

## README

# gulptask-demo-page

> A CLI tool that generates demo HTML pages from specified JavaScript/TypeScript source files.

[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
[![npm version](https://img.shields.io/npm/v/@masatomakino/gulptask-demo-page.svg?style=flat)](https://www.npmjs.com/package/@masatomakino/gulptask-demo-page)
[![GitHub](https://img.shields.io/badge/GitHub-Repository-blue?logo=github&style=flat)](https://github.com/MasatoMakino/gulptask-demo-page)
[![build test](https://github.com/MasatoMakino/gulptask-demo-page/actions/workflows/buildJS.yml/badge.svg)](https://github.com/MasatoMakino/gulptask-demo-page/actions/workflows/buildJS.yml)

## Getting Started

### Preparing Demo Source Files

Place your demo source files in the `demoSrc` directory.
File names should have a `demo_` prefix, like `demoSrc/demo_sample.ts`.

### Generating Demo Pages

To generate demo pages, run the following command:

```bash
npx @masatomakino/gulptask-demo-page
```

This command will generate a set of HTML files that load the demo scripts, along with an index page, in the `docs/demo` directory.

## CLI

you can generate demo pages from the CLI.

```
npx @masatomakino/gulptask-demo-page
```

See `--help` command for options.

### Options

#### -W --watch

Enable watch mode. Default: false

#### --prefix <string>

Specify the prefix for demo page filenames. Default: demo

#### --srcDir <path>

Specify the directory containing demo source files. Default: ./demoSrc

#### --distDir <path>

Specify the output directory for generated demo pages. Default: ./docs/demo

#### --body <string>

Specify HTML tags to insert into the body. The specified content will be inserted within the `<body>` tag of the generated HTML.

#### --style <string>

Specify CSS styles to apply to the demo page. The specified styles will be inserted within the `<style>` tag of the generated HTML. Example: "canvas{background-color:#000}"

#### --copyTargets [extensions...]

Specify file extensions to copy. Example: "png", "jpg", "jpeg", "obj". Default: "png", "jpg", "jpeg"

#### --externalScripts [url...]

Specify an array of script file URLs to load from external CDNs. Use this when loading external modules that cannot be bundled via npm. Example: "https://code.createjs.com/1.0.0/createjs.min.js"

#### --rule <path>

Path to the webpack rule configuration file (e.g., `webpack.config.js`). If this option is specified, the specified configuration file will be loaded. If not specified, the default configuration file built into the package will be used.

#### --compileTarget <string>

Corresponds to TypeScript's `tsconfig.compilerOptions.target`. See the official documentation for details. Example: es5

#### --compileModule <string>

Corresponds to TypeScript's `tsconfig.compilerOptions.module`. See the official documentation for details. Example: es2020

#### --compileModuleResolution <string>

Corresponds to TypeScript's `tsconfig.compilerOptions.moduleResolution`. See the official documentation for details. Example: node, node16, bundler

### TypeScript Source Map Configuration

To enable TypeScript source mapping in browser DevTools during watch mode, add the `--sourceMap` flag to your library project's tsc command:

```bash
tsc --sourceMap
```

Alternatively, configure your `tsconfig.json`:

```json
{
  "compilerOptions": {
    "sourceMap": true
  }
}
```

This generates `.js.map` files that allow browser DevTools to map bundled JavaScript back to original TypeScript source files.

### Complete Example

This example demonstrates common CLI options:

```bash
npx @masatomakino/gulptask-demo-page \
  --prefix demo \
  --srcDir ./demoSrc \
  --distDir ./docs/demo \
  --body '<div></div>' \
  --style 'canvas{background-color:#000}' \
  --externalScripts 'https://code.createjs.com/1.0.0/createjs.min.js' \
  --rule ./rule.js \
  --compileTarget es6
```

Add `-W` flag for watch mode.

#### -h, --help

display help for command

## npm script

- build : build gulptask-demo-page binary.
- watch : watch src dir and build binary.
- testRun : run "gulptask-demo-page" generated by "build" command.

## License

[MIT licensed](LICENSE).

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