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-deveaseconfig.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.jsoutDir: Path to the output directory where the CSS files should be written, relative toeaseconfig.jscleanOutDir: 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