CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-clean-css

A well-tested CSS minifier providing fast and efficient CSS optimization and minification.

93

1.17x

Quality

Pending

Does it follow best practices?

Impact

93%

1.17x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

task.mdevals/scenario-3/

CSS Minification Report Generator

A utility that minifies CSS files and generates detailed statistics reports about the optimization results.

Capabilities

Minify CSS and extract statistics

  • Given a CSS file path "styles.css" containing valid CSS, the tool minifies it and returns an object with properties: originalSize (number of bytes), minifiedSize (number of bytes), and timeTaken (milliseconds spent optimizing) @test

Calculate efficiency metrics

  • Given minification results with originalSize=5000 and minifiedSize=3200, the tool calculates and returns an efficiency percentage of 36 (rounded to nearest integer) @test

Generate formatted report

  • Given statistics with originalSize=10240, minifiedSize=7168, timeTaken=45, and efficiency=30, the tool generates a formatted report string containing all these values in a human-readable format @test

Implementation

@generates

API

/**
 * Minifies a CSS file and returns optimization statistics
 *
 * @param {string} cssFilePath - Path to the CSS file to minify
 * @returns {Object} Statistics object with originalSize, minifiedSize, timeTaken properties
 */
function minifyAndGetStats(cssFilePath) {
  // IMPLEMENTATION HERE
}

/**
 * Calculates efficiency percentage from minification statistics
 *
 * @param {number} originalSize - Original file size in bytes
 * @param {number} minifiedSize - Minified file size in bytes
 * @returns {number} Efficiency as percentage (0-100), rounded to nearest integer
 */
function calculateEfficiency(originalSize, minifiedSize) {
  // IMPLEMENTATION HERE
}

/**
 * Generates a formatted statistics report
 *
 * @param {Object} stats - Statistics object with originalSize, minifiedSize, timeTaken, efficiency
 * @returns {string} Formatted report string
 */
function formatReport(stats) {
  // IMPLEMENTATION HERE
}

module.exports = {
  minifyAndGetStats,
  calculateEfficiency,
  formatReport
};

Dependencies { .dependencies }

clean-css { .dependency }

Provides CSS minification with detailed statistics tracking.

@satisfied-by

tile.json