# gulp-css-table-of-contents

> Gulp wrapper for css-table-of-contents

Latest version **1.0.2** (published 2020-04-13) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install gulp-css-table-of-contents
pnpm add gulp-css-table-of-contents
yarn add gulp-css-table-of-contents
bun add gulp-css-table-of-contents
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-04-13 |
| First published | 2020-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Žiga Miklič |
| Maintainers | zigamiklic |
| Keywords | TOC, Table of contents, Comments list, CSS, Gulp |

## Links

- npm: https://www.npmjs.com/package/gulp-css-table-of-contents
- Repository: https://github.com/ziga-miklic/gulp-css-table-of-contents
- Homepage: https://github.com/ziga-miklic/gulp-css-table-of-contents#readme
- Issues: https://github.com/ziga-miklic/gulp-css-table-of-contents/issues
- npm.io page: https://npm.io/package/gulp-css-table-of-contents

## Dependencies (2)

- [through2](https://npm.io/package/through2.md) ^3.0.1
- [css-table-of-contents](https://npm.io/package/css-table-of-contents.md) ^1.0.1

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-04-13
- 1.0.1 — 2020-04-13
- 1.0.0 — 2020-04-07

## README

# Gulp CSS Table Of Contents

Create a table of contents from comments in CSS files using a markdown-like syntax (`## Heading 2`). This is the Gulp version of [CSS Table Of Contents](https://github.com/ziga-miklic/css-table-of-contents).

## Example

The below example created a task `toc` (use `gulp toc` in the terminal). It adds a numeric table of content on top of all the CSS files inside the `css` folder and places them inside `dist`.

Place the below code inside `gulpfile.js`:

``` js
'use strict';
const gulp = require('gulp');
const toc = require('gulp-css-table-of-contents');

function addTableOfContent() {
	const options = {
		isShowNumbers: true,
		indentSize: 0,
	};

	return gulp.src('src/*/*.css')
		.pipe(toc(options))
		.pipe(gulp.dest('dist'));
}

exports['toc'] = addTableOfContent;
```

## Options

Pass in options just like you would for the Node version except for the `code` option which will be automatically set.

A full list of options is available [here](https://github.com/ziga-miklic/css-table-of-contents#options).

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