Fz Uglify CSS
Fz Uglify CSS is a CSS parser which is minify your CSS files.
Installation
npm install --save fz-uglifycss // to install locally npm install -g --save fz-uglifycss // to install globally
API Reference
; // in es6 let css = `body{ background: red;}`; let minifiedCss = ; console;// 'body{background:red}'
Params | Type | Description | Default |
---|---|---|---|
Source or Source path |
string or array |
You can pass source content or source path to this method |
-none- |
options |
object |
{isPath: false, isString: true} |
{isString: true} |
Three types you have pass arguments to this method
-
Type1 -
source content only
-minify('body{ backgroung: red }')
-
Type2 -
a single source path as string and option {isPath: true}
-minify('./src/path', {isPath: true})
-
Type3 -
source path as array and option {isPath: true}
-minify(['./src/path1', './src/path2'], {isPath: true})
Here is yours examples
Examples
CLI Reference
You can use fz-uglifycss
in CLI.
fz-uglifycss -s src -d lib // in command line
// in package.json
Params | Description |
---|---|
-s |
This is means source directory |
-d |
This is means designation directory |
-h or -help |
For help |
My minification rules
- Remove commented lines
- Remove line breaks
- Remove unwanted spaces and taps
- Remove last semicolon of a style
Conclusion
Tell your thoughts and face any bug assign that on Issuses.