UNPKG

knip

Version:

Find and fix unused dependencies, exports and files in your TypeScript and JavaScript projects

19 lines (18 loc) 568 B
import { hasDependency } from "../../util/plugin.js"; import compiler from "./compiler.js"; const title = 'Tailwind'; const enablers = ['tailwindcss']; const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers); const entry = ['tailwind.config.{js,cjs,mjs,ts}']; const registerCompilers = ({ registerCompiler, hasDependency }) => { if (hasDependency('tailwindcss')) registerCompiler({ extension: '.css', compiler }); }; const plugin = { title, enablers, isEnabled, entry, registerCompilers, }; export default plugin;