# tailwindcss-statamic-purge-helper

> Helper methods for using tailwindcss in a statamic site.

Latest version **0.1.1** (published 2021-04-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install tailwindcss-statamic-purge-helper
pnpm add tailwindcss-statamic-purge-helper
yarn add tailwindcss-statamic-purge-helper
bun add tailwindcss-statamic-purge-helper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2021-04-23 |
| First published | 2021-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Manuel Pirker-Ihl |
| Maintainers | ambersive_com |
| Keywords | statamic, tailwindcss |

## Links

- npm: https://www.npmjs.com/package/tailwindcss-statamic-purge-helper
- Repository: https://github.com/AMBERSIVE/tailwindcss-statamic-purge-helper
- Homepage: https://github.com/AMBERSIVE/tailwindcss-statamic-purge-helper#readme
- Issues: https://github.com/AMBERSIVE/tailwindcss-statamic-purge-helper/issues
- npm.io page: https://npm.io/package/tailwindcss-statamic-purge-helper

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2021-04-23
- 0.1.0 — 2021-04-23

## README

# Statamic Tailwindcss Purger Helper

## Installation

```bash
npm install npm i tailwindcss-statamic-purge-helper --save
```

## How-to

This package provides some methods for a faster streamlined way to setup the purgecss part in a statamic application.

### createPurgePaths:

This method provides a basis list of paths in a statamic application.


### extractFromMarkdown:

This method will create a extractor for markdown files.  It will search for fields in each files and will extract the content as a list which will not be removed from the purged file.


### createWhitelist:

Creates a list of items based on the settings object.
### Example:

```js

module.exports = {
    purge: {
        mode: 'all',
        preserveHtmlElements: true,
        content: purgeHelper.createPurgePaths([]),
        options: {
            extractors: [
              purgeHelper.extractFromMarkdown([
                  'button_color', 
                  'background', 
                  'color', 
                  'row_color', 
                  'row',
                  'align',
                  'spacing',
                  'columns_per_row',
                  'headline_color'
              ]),
              purgeHelper.createWhitelist({
                 gridCols: 10,
                 keep: [
                    'w-1/5',
                    'w-2/5',
                    'w-3/5',
                    'w-4/5',
                    'w-5/5',
                    'bg-gradient-to-t',
                    'from-landmarx-green-900',
                    'to-landmarx-green-100'
                 ],
                 paddingList: [
                    '0',
                    '1',
                    '2',
                    '3',
                    '4',
                    '5',
                    '6',
                    '7',
                    '8',
                    '9',
                    '10',
                    '12',
                    '16',
                    '20',
                    '32',
                 ]
              }),
            ],
        },
    },
    ....
```

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