Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/less/less-plugin-clean-css
Post-process and compress CSS using clean-css.
https://github.com/less/less-plugin-clean-css
less-plugin
Last synced: about 1 month ago
JSON representation
Post-process and compress CSS using clean-css.
- Host: GitHub
- URL: https://github.com/less/less-plugin-clean-css
- Owner: less
- License: apache-2.0
- Created: 2014-09-09T20:31:01.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-04-18T09:12:39.000Z (7 months ago)
- Last Synced: 2024-05-23T07:31:31.301Z (6 months ago)
- Topics: less-plugin
- Language: JavaScript
- Homepage: http://lesscss.org
- Size: 55.7 KB
- Stars: 189
- Watchers: 17
- Forks: 40
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# less-plugin-clean-css
Compresses the css output from less using [clean-css](https://github.com/jakubpawlowicz/clean-css).
## lessc usage
First of all install less via
```bash
npm install -g less
```then install the `less-plugin-clean-css`
```bash
npm install -g less-plugin-clean-css
```and then on the command line,
```bash
lessc file.less --clean-css="--s1 --advanced --compatibility=ie8"
```See [clean-css](https://github.com/jakubpawlowicz/clean-css/tree/v3.0.1#how-to-use-clean-css-programmatically) for the
available command options - the only differences are `advanced` and `rebase` which we default to false, because it is
not always entirely safe.## Programmatic usage
```js
var LessPluginCleanCSS = require('less-plugin-clean-css'),
cleanCSSPlugin = new LessPluginCleanCSS({advanced: true});
less.render(lessString, {plugins: [cleanCSSPlugin]})
.then(
```## Browser usage
Browser usage is not supported at this time.