Hack to enable source maps in with gulp-sourcemaps and autoprefixer.
✓ Published0🌍 Public
MMcNull
Last edited Aug 12, 2014
Created on Aug 12, 2014
This example demonstrates a custom Gulp plugin that enables source maps when using Autoprefixer with gulp-sourcemaps. The code defines a module that processes CSS files through the `autoprefixer` library, updates the file contents with prefixed CSS, and applies the resulting map via `vinyl-sourcemaps-apply`. It integrates with `through2` for stream handling and is designed for use within a Gulp task where sourcemaps are initialized and written. The gist shows the complete function, including error handling for streams and null files.
AI-generated description