Created
May 14, 2017 14:24
-
-
Save eddiesigner/d6acd4021f7dc5b5c0c2a05e5f57a230 to your computer and use it in GitHub Desktop.
Gulp Simple Media Queries Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var postcss = require('gulp-postcss'); // Load PostCSS | |
var postcss_nested = require('postcss-nested'); // Load the postcss-nested plugin | |
var simple_media_queries = require('postcss-simple-media-queries'); // Load the postcss-simple-media-queries plugin | |
gulp.task('css', function () { | |
var processors = [ // The order is important because this plugin depends on nesting capabilities | |
simple_media_queries, | |
postcss_nested | |
]; | |
return gulp.src('./src/*.css') // Your source stylesheets | |
.pipe(postcss(processors)) // Processes the styles through the plugin | |
.pipe(gulp.dest('./dest')); // Get a compiled stylesheets | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment