mirror of
https://ghproxy.net/https://github.com/elementor/elementor-icons.git
synced 2025-10-04 23:07:22 +08:00
15 lines
519 B
JavaScript
15 lines
519 B
JavaScript
import { promises as fs } from 'fs';
|
|
import postcss from 'postcss';
|
|
import cssNano from 'cssnano';
|
|
|
|
const postCss = async ( cssFilePath, outputFilePath ) => {
|
|
const css = await fs.readFile( cssFilePath );
|
|
const result = await postcss( [ cssNano ] )
|
|
.process( css, { from: cssFilePath, to: outputFilePath } );
|
|
await fs.writeFile( outputFilePath, result.css );
|
|
if ( result.map ) {
|
|
await fs.writeFile( outputFilePath, result.map );
|
|
}
|
|
};
|
|
|
|
await postCss( 'css/elementor-icons.css', 'css/elementor-icons.min.css' );
|