Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/callumacrae/gulp-cssnano
Minify CSS with cssnano.
https://github.com/callumacrae/gulp-cssnano
Last synced: 2 months ago
JSON representation
Minify CSS with cssnano.
- Host: GitHub
- URL: https://github.com/callumacrae/gulp-cssnano
- Owner: callumacrae
- License: mit
- Created: 2015-04-20T11:43:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-20T11:43:26.000Z (over 9 years ago)
- Last Synced: 2024-10-10T00:11:10.618Z (3 months ago)
- Language: JavaScript
- Size: 93.8 KB
- Stars: 1
- Watchers: 1
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# [gulp][gulp]-cssnano [![Build Status](https://travis-ci.org/ben-eb/gulp-cssnano.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/gulp-cssnano.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/gulp-cssnano.svg)][deps]
> Minify CSS with cssnano.
## Install
With [npm](https://npmjs.org/package/gulp-cssnano) do:
```
npm install gulp-cssnano --save-dev
```## Example
```js
var gulp = require('gulp');
var nano = require('gulp-cssnano');gulp.task('default', function() {
return gulp.src('./main.css')
.pipe(nano())
.pipe(gulp.dest('./out'));
});
```## Source Maps
gulp-cssnano supports [gulp-sourcemaps]:
```js
var gulp = require('gulp');
var nano = require('gulp-cssnano');
var sourcemaps = require('gulp-sourcemaps');gulp.task('default', function () {
return gulp.src('main.css')
.pipe(sourcemaps.init())
.pipe(nano())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./out'));
});
```## Contributing
Pull requests are welcome. If you add functionality, then please add unit tests
to cover it.## License
MIT © [Ben Briggs](http://beneb.info)
[ci]: https://travis-ci.org/ben-eb/gulp-cssnano
[deps]: https://gemnasium.com/ben-eb/gulp-cssnano
[gulp]: https://github.com/gulpjs/gulp
[gulp-sourcemaps]: https://github.com/floridoo/gulp-sourcemaps
[npm]: http://badge.fury.io/js/gulp-cssnano