awcodes / filament-plugin-purge

A purge tool to keep your Filament plugin from bloating / duplicating Filament's default styles.
MIT License
9 stars 2 forks source link

Filament Plugin Purge

Installation

npm install @awcodes/filament-plugin-purge

:bangbang: Run this command after building your Tailwind CSS based stylesheet. :bangbang:

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

License

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