0.0.9 • Published 8 years ago

fz-uglifycss v0.0.9

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

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

import minify from 'fz-uglifycss'; // in es6

let css = `body{
  background: red;
}`;

let minifiedCss = minify(css);

console.log(minifiedCss);
// 'body{background:red}'
ParamsTypeDescriptionDefault
Source or Source pathstring or arrayYou can pass source content or source path to this method-none-
optionsobject{isPath: false, isString: true}{isString: true}-none-

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

{
  "scripts": {
    "build:css": "fz-uglifycss -s src -d lib"
  }
}
ParamsDescription
-sThis is means source directory
-dThis is means designation directory
-h or -helpFor 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.

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago