@luncheon/rollup-plugin-purgecss-keep-string-literals
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@luncheon/rollup-plugin-purgecss-keep-string-literals

An experimental rollup plugin that removes the rest of the CSS, leaving only the selectors used in the string literals in the JavaScript source code.

Installation

$ npm i -D rollup @luncheon/rollup-plugin-purgecss-keep-string-literals

Usage

// rollup.config.js
import purgecssKeepStringLiterals from '@luncheon/rollup-plugin-purgecss-keep-string-literals'

export default {
  plugins: [
    purgecssKeepStringLiterals({
      css: ["node_modules/tailwindcss/dist/utilities.min.css"],
      output: "dist/utilities.css",
      include: ["src/**/*.ts"],
    })
  ]
}

Options

css

Type: (string | { raw: string })[]

Array of the CSS file name or the CSS content.

output

Type: string

Output file name.

include

Type: string | string[] Default: null

Minimatch pattern(s) for which the plugin should collect the string literals. By default all bundled files are targeted.

exclude

Type: string | string[] Default: null

Minimatch pattern(s) for which the plugin should ignore. By default no files are ignored.

License

WTFPL

Readme

Keywords

none

Package Sidebar

Install

npm i @luncheon/rollup-plugin-purgecss-keep-string-literals

Weekly Downloads

0

Version

0.0.2

License

WTFPL

Unpacked Size

5.1 kB

Total Files

5

Last publish

Collaborators

  • luncheon