ease-task-minify-css
v1.0.4
Published
CSS minifier for Ease task runner.
Downloads
3
Maintainers
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 toeaseconfig.js
outDir
: Path to the output directory where the CSS files should be written, relative toeaseconfig.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