UNPKG

@sequencemedia/css-purge

Version:

A CSS tool written in Node JS as a command line app or library for the purging, burning, reducing, shortening, compressing, cleaning, trimming and formatting of duplicate, extra, excess or bloated CSS.

12 lines (9 loc) 166 B
import { statSync } from 'node:fs' export default function getFileSizeInKB (filePath) { const { size } = statSync(filePath) return (size || 0) / 1000 }