JSPM

ease-task-minify-css

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q43257F
  • License MIT

CSS minifier for Ease task runner.

Package Exports

  • ease-task-minify-css

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ease-task-minify-css) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Ease Task Runner CSS Minifier Plugin

This is a plugin for the Ease task runner. It uses the clean-css module to minify CSS files.

Installation

npm install ease-task-minify-css --save-dev

easeconfig.js:

const minifyCss = require('ease-task-minify-css');

module.exports = ease => {

  ease.install('minify-css', minifyCss, {});

};

Configuration

This plugin takes a config object similar to Clean CSS Options while ignoring the property returnPromise and adding the following properties:

  • dir: Path to a directory containing all the SASS files, relative to easeconfig.js
  • outDir: Path to the output directory where the CSS files should be written, relative to easeconfig.js
  • cleanOutDir: Boolean indicating if the output directory should be emptied first

Example

easeconfig.js:

const minifyCss = require('ease-task-minify-css');

module.exports = ease => {

  ease.install('minify-css', minifyCss, {
    dir: 'css',
    outDir: 'css',
    cleanOutDir: false,
    compatibility: 'ie8',
    sourceMap: true
  });

  ease.job('minify-css-files', ['minify-css']);

};

CLI:

ease minify-css-files