@awcodes/filament-plugin-purge

中文文档
1.1.2发布于 2023/11/06MITES Module近 30 天下载 2354

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

原始使用文档

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

  • -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.

版本与发布记录

@awcodes/filament-plugin-purge 共发布 6 个版本,首次发布于 2022/08/24;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.1.2latest2023/11/063 年前
1.1.12023/06/163 年前
1.1.02023/05/123 年前
1.0.22022/08/314 年前
1.0.12022/08/244 年前
1.0.02022/08/244 年前

关于 @awcodes/filament-plugin-purge 的常见问题

@awcodes/filament-plugin-purge 是什么?

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

如何安装 @awcodes/filament-plugin-purge?

在项目目录运行 npm install @awcodes/filament-plugin-purge,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 filament-purge,可以用 npx filament-purge 直接运行。

@awcodes/filament-plugin-purge 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/awcodes__filament-plugin-purge 是否存在。

@awcodes/filament-plugin-purge 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@awcodes/filament-plugin-purge 可以商用吗?

@awcodes/filament-plugin-purge 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@awcodes/filament-plugin-purge 的下载量有多少?

根据 npm 官方下载统计,@awcodes/filament-plugin-purge 在 2026/10/07 – 2026/11/05 这 30 天内被下载 2,354 次,日均约 78 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@awcodes/filament-plugin-purge 还在维护吗?

最新版本 1.1.2 发布于 2023/11/06(3 年前);至今共发布 6 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/08/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。