JSPM

@awcodes/filament-plugin-purge

1.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 61
  • Score
    100M100P100Q77681F
  • License MIT

A purge tool to keep your Filament plugin from bloating / duplicating Filament's default styles.

Package Exports

  • @awcodes/filament-plugin-purge
  • @awcodes/filament-plugin-purge/filament-purge.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@awcodes/filament-plugin-purge) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Filament Plugin Purge

Installation

npm install @awcodes/filament-plugin-purge

‼️ Run this command after building your Tailwind CSS based stylesheet. ‼️

You can either run the command manually inside your plugin directory or it can be added to the scripts section of your package.json file.

filament-purge -i path/to/input.css -o path/to/output.css
"scripts": {
    "dev": "npx tailwindcss -i resources/css/plugin.css -o resources/dist/plugin.css --postcss --watch", // Example only
    "build": "npx tailwindcss -i resources/css/plugin.css -o resources/dist/plugin.css --postcss --minify && npm run purge", // Example only
    "purge": "filament-purge -i resources/dist/plugin.css -o resources/dist/plugin.css"
},

Options / Flags

  • -i (Path to the plugin css file to be purged)
  • -o (Path to save the purged plugin file to)
  • -v (Flag to support v3 plugin development)
    • defaults to '2.x'
    • options are '2.x' or '3.x'

License

Filament Plugin Purge is open-sourced software licensed under the MIT license.